时间:2010-07-25 16:10:28

标签: android eclipse

5 个答案:

答案 0 :(得分:35)

答案 1 :(得分:10)

答案 2 :(得分:7)

Android SDK工具版本16中存在一个错误,需要正确排序uses-sdk标记。如果您同时使用targetSdkVersionminSdkVersion,请按以下方式对其进行排序:

<uses-sdk android:targetSdkVersion="10" /> <!-- before minSdkVersion -->
<uses-sdk android:minSdkVersion="7" />     <!-- after targetSdkVersion -->

撤消订单将显示警告消息并弹出设备选择窗口。因此,我建议将其写在一行中:

<uses-sdk android:targetSdkVersion="10" android:minSdkVersion="7" />

答案 3 :(得分:2)

清单应该只包含一个元素,多次使用会出错。

在ADT 17中,我们有一个新的lint警告,可以检测并报告此问题:

$ lint --version
lint: version 17
$ lint --show MultipleUsesSdk
MultipleUsesSdk
---------------
Summary: Checks that the <uses-sdk> element appears at most once

Priority: 6 / 10
Severity: Error
Category: Correctness

The <uses-sdk> element should appear just once; the tools will *not* merge the
contents of all the elements so if you split up the atttributes across
multiple elements, only one of them will take effect. To fix this, just merge
all the attributes from the various elements into a single <uses-sdk>
element.

更多信息:http://developer.android.com/guide/topics/manifest/uses-sdk-element.html

答案 4 :(得分:0)

您必须在代码中指定API级别,它应该在一行中。

uses-sdk android:targetSdkVersion =“19”android:minSdkVersion =“4”。

目标应该是最新的。它可能会帮助你,因为它对我有用。感谢