Android第六课 安装异常处理

人生必须的知识就是引人向光明方面的明灯。这篇文章主要讲述Android第六课 安装异常处理相关的知识,希望能为你提供帮助。
1 已安装了存在签名冲突的同名数据包
        通过软件管理,将即将安装的XXX.apk的同名软件卸载,然后进入到安装包中,点击XXX.apk

2 拷贝文件夹失败
        打开设置,选择存储,找到USB计算机连接,大容量连接电脑

3 NDK location not valid in preferences
        该原因是NDK没有配置的原因
 
4 Unable to launch cygpath
        IsCygwin on the path?] java.io.IOException: Cannot run program" cygpath" : CreateProcess error=2, 系统找不到指定的文件。
 
5.5
Description          Resource Path Location    Type
The container ' android Dependencies' references non existing library' D:Javaworkplaceappcompat_v7inappcompat_v7.jar'                 helloworld                                  Buildpath                Build Path Problem
 
 
emulator:ERROR: Unable to load VM from snapshot. The snapshot has been saved for adifferent hardware configuration.
 
5 eclipse菜单没有AndroidVirtual Device Manager
在eclipse中的window→Customize Perspective→Command Groupsavailability→Available commandgroups
 
然后找到,通过setXXX才可以
6 Android Dependencies问题
错误问题:
Description          Resource Path Location    Type
The container ' Android Dependencies' references non existing library' D:svn\_test_androidappcompat_v7inappcompat_v7.jar'                 hello                                    Buildpath                Build Path Problem
解决方案:选择项目Project + clean即可
 
6.1解决历程
这些问题是否与build path有关
是否是Java Build Path问题,如下:
结论:结果发现其实Android 5.1.1可以不勾选,保持默认即可
7 Unable to resolve target ' android-19' until the SDK is
描述如下:Description  Resource Path Location    Type
Unable toresolve target ' android-19' until the SDK is loaded.              anddt                                Unknown Android Target Problem


7.1解决里程碑
1、打开android sdk manager,步骤如图:
2.查看开发环境安装的sdk的对应API号码,下图中的对号码为19,参考下图,找到你的环境版本号
3.打开导入工程目录下的project.properties文件,打开工具为记事本
4.找到android-xx这一行,将xx数字修改改为步骤二中得到的数字,这时候再打开工程就可以了
# Project target.
target=android-19
修改后的结果:
# Project target.
target=android-18
 
详细的解释:
default.properties 里的target选取对应的
或右键工程属性 properties =》 android => android build target 选择库
也就是库API选择不正确
我们应该选择哪个库值得思考!!!
8 The project was not built since its build path isincomplete
详细描述:
The project wasnot built since its build path is incomplete. Cannot find the class file forjava.lang.Object. Fix the build path then try building this project    anddt                                Unknown Java Problem
The typejava.lang.Object cannot be resolved. It is indirectly referenced from required.class files        Common.java         
解决方案:
看看project -- BuildAutomatically有没有勾上?如果没有,勾上以后,clean一下,重启eclipse
 
9 Could not delete ' /test/bin/classes/cn' .
Description          Resource Path Location    Type
The project was not built due to" Could not delete ' /test/bin/classes/cn' ." . Fix the problem, thentry refreshing this project and building it since it may be inconsistent    anddt                                Unknown Java Problem
解决方案:进入到test/bin/classes/目录,手动删除cn目录
 
Description          Resource Path Location    Type
The project cannot be built until buildpath errors are resolved        test                                Unknown Java Problem
 
Description          Resource Path Location    Type
R cannot beresolved to a variable  MainActivity.java        /feng/src/com/example/feng line 13          JavaProblem
 
Errors occurred during thebuild.
Errors running builder ' Android Package Builder' on project' appcompat_v7' .
Problems encountered while deleting resources.
Could not delete ' D:doc\_helloappcompat_v7inappcompat_v7.jar' .
Problems encountered while deleting files.
Could not delete: D:doc\_helloappcompat_v7inappcompat_v7.jar.
Problems encountered while deleting resources.
Could not delete ' D:doc\_helloappcompat_v7inappcompat_v7.jar' .
Problems encountered while deleting files.
Could not delete: D:doc\_helloappcompat_v7inappcompat_v7.jar.
10Activity not started, itscurrent task has been brought to the front
原因分析:因为你的模拟器中还有东西在运行,也就是你要运行的activity已经有一个在模拟器中运行了。不要以认为模拟器退出到桌面了就没有东西在跑了。在你调试的时候异常关闭的程序有可能就有activity在运行。
解决方法:project-> clean。
11 Android:安装时提示:INSTALL_FAILED_INSUFFICIENT_STORAGE
说明存储卡的空间不足,可以使用adb shell,登陆手机使用df查看/data的存储空间,解决方案是删除多余的软件

【Android第六课 安装异常处理】


    推荐阅读