Problem starting Android ApiDemos in Eclipse

I created a project from the ApiDemo sample code in Eclipse (on Windows 7), as described here: http://developer.android.com/resources/samples/get.html

When I try to start a project, I get the following output:

[2011-03-23 01:59:39 - ApiDemos] Uploading ApiDemos.apk onto device 'emulator-5554' [2011-03-23 01:59:44 - ApiDemos] Installing ApiDemos.apk... [2011-03-23 02:01:24 - ApiDemos] Re-installation failed due to different application signatures. [2011-03-23 02:01:24 - ApiDemos] You must perform a full uninstall of the application. WARNING: This will remove the application data! [2011-03-23 02:01:24 - ApiDemos] Please execute 'adb uninstall com.example.android.apis' in a shell. [2011-03-23 02:01:24 - ApiDemos] Launch canceled! 

Then the emulator opens and the lock screen appears. I will unlock it and open the application panel, and the ApiDemos icon means it has been installed. I open it and it works fine, i.e. All demos work. My question is why am I getting the above reinstallation errors? And why is the launch canceled? When I run the adb removal command in the CMD window, it completes successfully, and then starts the application again in Eclipse, and it installs and starts normally. What is going on here?

+7
source share
1 answer

When you compile the APK file, it will be signed with your own debug key. This key is different from the key used to create the previous version of the API demo that you had on your emulator image before.

You cannot replace an existing application with another key. This is partly to prevent restarting imposter applications from existing applications.

+5
source

All Articles