Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android: Failed to ensure directory when getExternalFilesDir(null)

As shown in the title, when I called the method getExternalFilesDir(null), i got a warning like this: Failed to ensure directory: /storage/emulated/0/Android/data/com.xxxx.app/files

So, it turns out that the i cannot get the path /storage/emulated/0/Android/data/com.xxxx.app/files Also, the problem only happens sometimes.

like image 933
Jerome Avatar asked Jan 02 '15 02:01

Jerome


1 Answers

This happened to me when uninstalling the app and reinstalling it. But probably the resources of the app (com.xxxx.app in your case) had a reference not released.

The solution was quite simple: just stop and relaunch the emulator, or reboot the phone should do the trick.

like image 156
Chakir Avatar answered Oct 22 '22 04:10

Chakir