导入Android SDK中Sample下ApiDemos报错的解决办法
今天突然想看下Sample下面Google为我们提供的例子是在么写的,就选了歌例子导入,谁知导入后没错,运行的时候出先了下面的错误:
[2011-09-21 11:01:52 - ApiDemos] Re-installation failed due to different application signatures.
[2011-09-21 11:01:52 - ApiDemos] You must perform a full uninstall of the application. WARNING: This will remove the application data!
[2011-09-21 11:01:52 - ApiDemos] Please execute 'adb uninstall com.example.android.apis' in a shell.
[2011-09-21 11:01:52 - ApiDemos] Launch canceled!
第一反应是上网查,但是没查到,正不知道该在么解决的时候突然看到这句
Please execute 'adb uninstall com.example.android.apis' in a shell.
于是抱着试一试的心态在CMD下面执行了adb uninstall com.example.android.apis
然后回去运行,成功了!!!
具体操作步骤如下:
- 出现警告后保持虚拟机打开的状态
- cd [SDK安装目录]\ platform-tools
- adb uninstall com.example.android.apis
- 然后重新运行ApiDemos
- ApiDemos主菜单出现
个人觉得这个ApiDemos很值得研究下,推荐大家在闲的时候多看看Google提供给我们的例子。