Android Question java.io.FileNotFoundException: /storage/emulated/0/Android/data/com.myApp.android/files/database.db: open failed: ENOENT (No such file or directory)

WebQuest

Active Member
Licensed User
Longtime User
Hello,
for a long time now on all apps I have had this problem.
I understand that google android has set new limits based on old techniques in a modern way. But then is b4a a deprecated compiler? Has anyone solved it?

java.io.FileNotFoundException: /storage/emulated/0/Android/data/com.myApp.android/files/database.db: open failed: ENOENT (No such file or directory)

B4a:
If  File.Exists(File.DirDefaultExternal,"database.db") = False Then
        Log("copia db nella cartella...")
        'Try
        File.Copy(File.DirAssets,"database.db",File.DirDefaultExternal,"database.db")
    Log("Copia del db riuscita")
      ' Catch
Log("Errore nella copia del db!")
        'End Try  
        Else
        Log("il database è già presente nella cartella!")
    End If
 

walterf25

Expert
Licensed User
Longtime User
Hello,
for a long time now on all apps I have had this problem.
I understand that google android has set new limits based on old techniques in a modern way. But then is b4a a deprecated compiler? Has anyone solved it?

java.io.FileNotFoundException: /storage/emulated/0/Android/data/com.myApp.android/files/database.db: open failed: ENOENT (No such file or directory)

B4a:
If  File.Exists(File.DirDefaultExternal,"database.db") = False Then
        Log("copia db nella cartella...")
        'Try
        File.Copy(File.DirAssets,"database.db",File.DirDefaultExternal,"database.db")
    Log("Copia del db riuscita")
      ' Catch
Log("Errore nella copia del db!")
        'End Try 
        Else
        Log("il database è già presente nella cartella!")
    End If
You may missing the Runtime Permission request, please take a look here
https://www.b4x.com/android/forum/threads/runtime-permissions-android-6-0-permissions.67689/#content

Cheers,
Walter
 
Upvote 0
Top