I know that this is a quite common issue in android development, but the thing is that I do not have an SD card on my android device, so when I write android:installLocation="preferExternal"
in my manifest, I get Failure [INSTALL_FAILED_MEDIA_UNAVAILABLE]. Any idea how to fix it without SD card?
Asked
Active
Viewed 3,879 times
-2

Swoopyy
- 61
- 2
- 6
-
What is your question exactly? Just remove that line and it'll install the app on your internal memory. Please tell me if that's not what you want to happen. – Vucko Mar 10 '16 at 19:28
-
When I compile my app without that line, I get INSTALL_FAILED_INSUFFICIENT_STORAGE. That is a common android issue and a particular solution is described here http://stackoverflow.com/questions/4709137/solution-to-install-failed-insufficient-storage-error-on-android, but it does not really work for me, because I do not have SD card. – Swoopyy Mar 10 '16 at 19:49
-
You can declare installLocation="auto", which means that your application may be installed on the external storage, but you don't have a preference of install location. You have enough memory on your device? I know my phone won't let me install from play store even if I have 400mb and app takes up 20mb. It needs some free space for some reason. – Vucko Mar 10 '16 at 19:58
-
I had 350mb available, reallocating memory to 1gb solved my problem. Thanks! – Swoopyy Mar 10 '16 at 20:10
-
I will just put it into the answer so you can accept it or whatever.. just close this thread then :D – Vucko Mar 10 '16 at 21:23
2 Answers
1
You can declare installLocation="auto", which means that your application may be installed on the external storage, but you don't have a preference of install location. You have enough memory on your device? I know my phone won't let me install from play store even if I have 400mb and app takes up 20mb. It needs some free space for some reason.
It's quite a common thing, just free up some more space and you should be fine.

Vucko
- 7,371
- 2
- 27
- 45
0
I had the same issue. Fixed it with simple restarting of my Android mobile device ('LG L70')
Windows Command line:
d:\>adb -s LGL70 install myapp.apk
[100%] /data/local/tmp/myapp.apk
pkg: /data/local/tmp/myapp.apk
Failure [INSTALL_FAILED_INSUFFICIENT_STORAGE]
After restart the device:
d:\>adb -s LGL70 install myapp.apk
[100%] /data/local/tmp/myapp.apk
pkg: /data/local/tmp/myapp.apk
Success

Kiryl Ivanou
- 1,015
- 2
- 12
- 22