您的位置:首页 > 大数据 > 人工智能

真机上装不上测试应用,Installation error: INSTALL_FAILED_INSUFFICIENT_STORAGE

2016-05-05 23:28 363 查看
真机上老是装不上某个测试应用,而其他应用没问题!

总是出现以下错误提示:

[2016-05-05 23:23:43 - Manage] Installation error: INSTALL_FAILED_INSUFFICIENT_STORAGE

[2016-05-05 23:23:43 - Manage] Please check logcat output for more details.

[2016-05-05 23:23:43 - Manage] Launch canceled!

在配置文件AndroidManifest.xml中添加以下一句代码即可

<manifest xmlns:android="http://schemas.android.com/apk/res/android"

package="com.jinrongsystem.wanka"

android:installLocation = "preferExternal"

android:versionCode="1"

android:versionName="1.0" >

解析一下android:installLocation = "preferExternal"。

android:installLocation可以设置为"auto"、"internalOnly"、"preferExternal"三个值中的任何一个.

auto:程序可能被安装在外部存储介质上(例如:SD Card),但是默认会被安装到手机内存中.当手机内存为空时,程序将被安装到外部存储介质上.当程序安装到手机上后,用户可以决定把程序放在外部储介质还是内存中.

internalOnly:默认值.当设置为该值时,程序只能被安装在内存中,如果内存为空,则程序将不能成功安装.

preferExternal:将程序安装在外部存储介质上,但是系统不保证程序一定会被安装到外部存储介质上.当外部存储介质不可以或空时,程序将被安装到内存中.程序使用了forward-locking机制时也将被安装到内存中,因为外部存储不支持此机制.程序安装后,用户可以自由切换程序应该在外部还是内部存储介质上.

即:该应用会装在手机的内存卡上的!

参考:http://www.tuicool.com/articles/2UJZBz、http://www.cnblogs.com/Lefter/archive/2012/03/07/2383962.html

经实践自己的手机已经成功装上了开发中某应用!
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: