SD Card Transfer (not enough storage space)
Asked Answered
B

1

6

I am trying to allow my app to be able to be moved to an SD card. So far, I have added the attribute, android:installLocation="auto", to my manifest file.

When I try moving storage option from internal to external for the app (75MB) on my phone, the option is there to move it, but it keeps showing a toast saying "Not enough storage space" after it is 90% complete, even though I have plenty of space in my internal (64 GB) and external (128 GB). I also tried moving a different app on my phone that was larger than (75MB), and the transfer worked. I also tried creating a virtual emulator to try transferring my app, but it's doing the same thing.

Is there an attribute that I am missing in the manifest file for this problem to be happening? Any suggestions?

Birdella answered 13/11, 2017 at 21:49 Comment(1)
I am having the same issue here. Could anybody help for a solution?Bluetongue
C
2

android:installLocation="auto" is the only line of code needed to make the app movable to the SD card.

But installing with ▶ Run, the "Not enough storage space" toast appears.

To actually move the app to the SD card, within Android Studio you have also to:

  • Create a signed package, release variant, with: Build > Generate Signed Bundle/APK... > APK
  • Install it from Terminal with: adb install -r path/to/my/app-release.apk
Cistercian answered 5/7, 2021 at 22:43 Comment(1)
That is annoying. Great find. As always not documented by Google in Android StudioDisembroil

© 2022 - 2024 — McMap. All rights reserved.