Graham
Graham

Reputation: 581

Incompatible Android target device?

I'm new to Android and was just trying to load a sample project (Bluetooth Chat application) onto my smartphone (running Android 2.3.4). The target build project in Eclipse uses Android API level 15 (Android 4.0.3). When I try "Run as Android Application" with the phone connected, the Android Device chooser indicates that the device in not compatible, and I get the errors shown in the text below. How do I get around this problem? Surely I shouldn't have to downgrade my build target to a lower API level (10) and possible loose functionality?

Btw, the same project includes this in the manifest:

<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!

Many thanks :)

Upvotes: 2

Views: 8265

Answers (3)

CommonsWare
CommonsWare

Reputation: 1006584

[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!

The app already exists on your device, signed with one signing key. You are trying to install over top of it another copy of the same app (i.e., same package) with a different signing key.

Please remove the existing BluetoothChat app from your device (e.g., through Settings), then run the app.

Upvotes: 2

Rahul garg
Rahul garg

Reputation: 9362

The target build for your project should be 10 here, that would allow the project to run on devices >= api 10.

Upvotes: 1

Alex Curran
Alex Curran

Reputation: 8828

As it says, the key used to sign the BluetoothChat sample on your phone (maybe a release key?) is different from the one you're using to run it (debug key). Uninstall the app on your phone and (when it's not on your phone) select "Run as Android Application".

You can't upgrade an app (essentially what "Run as Android Application" does) if the keys are not the same.

Upvotes: 0

Related Questions