当前位置:   article > 正文

AndroidStudio提示“INSTALL_FAILED_INSUFFICIENT_STORAGE”"Do you want to uninstall the existing ..."_modules/: 5 files pushed. 22.7 mb/s (139826392 byt

modules/: 5 files pushed. 22.7 mb/s (139826392 bytes in 5.863s)

工作环境(蓝色粗体字为特别注意内容)
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"

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小小林熬夜学编程/article/detail/307475
推荐阅读
相关标签
  

闽ICP备14008679号