赞
踩
工作环境(蓝色粗体字为特别注意内容)
1,系统环境:Win7 Ultimate sp1、Android Studio 3.2、gradle 4.6
今天在使用AndroidStudio调试的时候,发现一个奇怪的报错。
Installation failed with message INSTALL_FAILED_INSUFFICIENT_STORAGE.
It is possible that this issue is resolved by uninstalling an existing version of the apk if it is present, and then re-installing.
WARNING: Uninstalling will remove the application data!
Do you want to uninstall the existing application?
截图如下:
清理了手机缓存,发现手机空间还有200M,按理说肯定足够的,出现这个问题有可能是由于上次安装的时候由于某些原因未能成功安装,所以造成手机空间有残留,因而出现上述错误。
尝试生成apk,然后adb手动安装,提示:
app-debug.apk: 1 file pushed. 2.8 MB/s (2127054 bytes in 0.719s)
WARNING: linker: app_process has text relocations. This is wasting memory and is a security risk. Please fix.
WARNING: linker: app_process has text relocations. This is wasting memory and is a security risk. Please fix.
pkg: /data/local/tmp/app-debug.apk
Failure [INSTALL_FAILED_INSUFFICIENT_STORAGE]
push到手机sdcard目录,然后手动安装,还是提示空间不足,难道200M的空间还是少了?于是清理一下手机缓存,发现能够正常安装了~~~~
经过以上的步骤排查,还是无法成功安装的话,可以尝试下面的方法:
方法一:进入Recovery,清空手机数据,这招可以说是“万灵药”,但是也是最不聪明的做法,毕竟谁也不想把手机数据全部清空,注意是“全部清空”,联系人什么的都会荡然无存!!
方法二:这个方法就很机智了,在AndroidManifest.xml的<manifest>标签下面添加android:installLocation="auto"
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。