Cannot install ApiDemos sample project on Android emulator

妖精的绣舞 提交于 2019-12-10 15:40:46

问题


I created ApiDemos project using Eclipse - New Project - Sample command. Trying to execute it on Android emulation, I got installation error. Then I opened data/app directory in the File Explorer, DDMS, and removed two files with name starting from ApiDemos (possibly this was incorrect, but this is done already). Now, trying to execute my ApiDemos project, I have:

[2011-11-15 16:23:19 - ApiDemos] Installation error: INSTALL_FAILED_UPDATE_INCOMPATIBLE
[2011-11-15 16:23:19 - ApiDemos] Please check logcat output for more details.
[2011-11-15 16:23:19 - ApiDemos] Launch canceled!

LogCat:

package com.example.android.apis signatures do not match the previously installed version, ignoring!

Is it possible to correct this now? I know that I can re-create emulator, but I would like to solve this problem with existing emulator, just to know how it should be done.


回答1:


uninstall the previous api demos by your adb command

adb -e uninstall com.example.android.apis

which installed in your emulator.

or try wipe user data while launching the emulator.




回答2:


First uninstall your application from the emulator:

adb -e uninstall your.application.package.name

Then try to install the application again.




回答3:


For me, with nexus 5 phone, the following command worked:

adb uninstall <Your_App_Package_Name>

so for your case, where package name is 'com.example.android.apis'

adb uninstall com.example.android.apis



回答4:


Other option is to go to the application manager. Navigate to the "All" tabs and scroll down to the bottom. Select the application and then from the menu select - uninstall for all users.




回答5:


You can also try 'uninstallAll' gradle task to uninstall the app completely



来源:https://stackoverflow.com/questions/8137962/cannot-install-apidemos-sample-project-on-android-emulator

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!