简体   繁体   English

Android Studio [Install_Failed_Insufficient_Storage]

[英]Android Studio [Install_Failed_Insufficient_Storage]

I have a problem with installing an apk of my app on my phone from Android Studio.我在从 Android Studio 在我的手机上安装我的应用程序的 apk 时遇到问题。 Every time i tried i got this error message:每次我尝试时都会收到此错误消息:

09/10 22:40:00: Launching app
$ adb push C:\Users\pokef\AndroidStudioProjects\Runescape\app\build\outputs\apk\app-debug.apk /data/local/tmp/com.myapps.myproductions.rsstats.
$ adb shell pm install -r "/data/local/tmp/com.myapps.myproductions.rsstats."
pkg: /data/local/com.myapps.myproductions.rsstats.
Failure [INSTALL_FAILED_INSUFFICIENT_STORAGE]


$ adb shell pm uninstall com.myapps.myproductions.rsstats.
DELETE_FAILED_INTERNAL_ERROR
Error while Installing APK

I know there are a lot of threads out there talking about this problem, but Ive already tried everything.我知道有很多线程在谈论这个问题,但我已经尝试了一切。 Im certain i have enough storage, i cleared all caches, i uninstalled all previous versions, i changed the manifest to "android:installLocation="preferExternal" , i restarted my phone etc, so please dont mark this as a duplicate.我确定我有足够的存储空间,我清除了所有缓存,我卸载了所有以前的版本,我将清单更改为 "android:installLocation="preferExternal" ,我重新启动了我的手机等,所以请不要将其标记为重复。

This problem only happens since i changed the package path from com.example.myapp etc. to com.myapps.myproductions.rsstats.此问题仅发生在我将包路径从 com.example.myapp 等更改为 com.myapps.myproductions.rsstats 后。 Im sure that I correctly adapted all paths in the files to this location.我确定我正确地将文件中的所有路径调整到这个位置。 What else could I try?我还能尝试什么?

This happens when you have installed many versions of different apps on the virtual device.当您在虚拟设备上安装了许多不同版本的应用程序时,就会发生这种情况。
Just stop the device.只需停止设备。 Open AVD Manager and right click on the device > Wipe Data .打开 AVD Manager 并右键单击device > Wipe Data
like in the pic.就像在图片中。
在此处输入图片说明

How much storage do you have free?你有多少免费存储空间? The system won't let the free storage space go below 200-300MB.系统不会让可用存储空间低于 200-300MB。 Also, please don't end your package name with a dot(this may be the issue, but the error message suggests otherwise)另外,请不要以点结尾您的包名(这可能是问题所在,但错误消息另有说明)

Since you claim to have enough storage free on the phone ( I would recommend to have at least 500MB free ) As suggested also by Aenadon, the problem could be the "."由于您声称手机上有足够的可用存储空间(我建议至少有 500MB 可用空间)正如 Aenadon 所建议的那样,问题可能出在“。” at the end of the package name.在包名的末尾。

Google suggests to name the packages with a reverse URL. Google 建议使用反向 URL 命名包。 for example:例如:

com.mycompanyname.appname com.mycompanyname.appname

by no means should end with a dot.绝不应该以点结尾。

I was having this issue in my device with 64 GB internal storage with 1.3 GB free.我的设备有 64 GB 内部存储空间和 1.3 GB 免费空间,但我遇到了这个问题。 I solved it simply doing my internal storage free by我解决了它,只需通过以下方式免费做我的内部存储

deleting about 1 GB videos删除大约 1 GB 的视频

because already the installed apps was not useless.因为已经安装的应用程序不是没用的。

我得到了 INSTALL_FAILED_INSUFFICIENT_STORAGE 并且解决方案是卸载应用程序然后重新安装它 - 问题是由不同版本的应用程序引起的。

Check your device storage space on which you are installing your app.检查您安装应用程序的设备存储空间。
Delete some data if space is running out.如果空间不足,请删除一些数据。
It happens because when you write bytes the size of that file became very large and thus this error occur (i am getting this error)发生这种情况是因为当您写入字节时,该文件的大小变得非常大,因此发生此错误(我收到此错误)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM