【发布时间】:2012-01-28 02:31:53
【问题描述】:
我是 Android 新手,只是想将示例项目(蓝牙聊天应用程序)加载到我的智能手机(运行 Android 2.3.4)上。 Eclipse 中的目标构建项目使用 Android API 级别 15 (Android 4.0.3)。当我在连接手机的情况下尝试“以 Android 应用程序运行”时,Android 设备选择器指示设备不兼容,并且我收到以下文本中显示的错误。我该如何解决这个问题?当然我不应该将我的构建目标降级到较低的 API 级别 (10) 和可能的松散功能吗?
顺便说一句,同一个项目在清单中包含这个:
<uses-sdk minSdkVersion="6" />
.
[2012-01-27 19:59:43 - BluetoothChat] Android Launch!
[2012-01-27 19:59:43 - BluetoothChat] adb is running normally.
[2012-01-27 19:59:43 - BluetoothChat] Performing com.example.android.BluetoothChat.BluetoothChat activity launch
[2012-01-27 19:59:43 - BluetoothChat] Automatic Target Mode: Unable to detect device compatibility. Please select a target device.
[2012-01-27 20:00:02 - BluetoothChat] WARNING: Application does not specify an API level requirement!
[2012-01-27 20:00:02 - BluetoothChat] Device API version is 10 (Android 2.3.4)
[2012-01-27 20:00:02 - BluetoothChat] Uploading BluetoothChat.apk onto device '304D1938E5584E7E'
[2012-01-27 20:00:02 - BluetoothChat] Installing BluetoothChat.apk...
[2012-01-27 20:00:03 - BluetoothChat] Re-installation failed due to different application signatures.
[2012-01-27 20:00:03 - BluetoothChat] You must perform a full uninstall of the application. WARNING: This will remove the application data!
[2012-01-27 20:00:03 - BluetoothChat] Please execute 'adb uninstall com.example.android.BluetoothChat' in a shell.
[2012-01-27 20:00:03 - BluetoothChat] Launch canceled!
非常感谢:)
【问题讨论】:
-
您为什么希望 Android 2.3.4 设备具有 4.0.3 的功能?更重要的是,您为什么希望 SDK 允许您编写无法在目标设备上运行的代码?
-
因为我认为 minSdkVersion="6" 可以让我在我的早期版本上运行它...?