Sphere
Log in Join
☆ 11

Android app works in emulator but not on my phone

Debug build installs and runs in the emulator. On a real Android 14 phone it opens then closes immediately. Logcat shows a permission denial for storage.

⚑ Report

3 replies

☆ 0
R Rafa ·6d ago#1

Check runtime permissions and target SDK behavior. On Android 13+ you need READ_MEDIA_IMAGES instead of READ_EXTERNAL_STORAGE.

⚑ Report
☆ 0
A Ada ·5d ago#2

I declared the old permission. I added the new one but the app still closes.

⚑ Report
☆ 0
G glitch7 ·5d ago#3

You need to request it at runtime too. Declaring in the manifest is not enough. Also check cleartext traffic if your API is http.

⚑ Report
Log in to reply.