Application Error On Phone But Not On Emulator
) I am beginner in Android programming and I have little problem. I wrote simple DataBase app(I have ready Data Base) and I need to copy it to app folder on phone. I have method fo
Solution 1:
On your phone go to
Settings->Storage
and verify if the flag for Mass storage only
isn't selected. When it is selected, your Device can't access the SD card for debugging purposes (nor other purposes in general). That's quite likely the reason the creation of your file is failing.
Solution 2:
The file you are using to seed your DB is not found, it must be on your filesystem on your machine (emulator can find it).
Here is the relevant error from your Logcat:
Caused by: java.io.FileNotFoundException: /data/data/com.example.namesgenerator/databases/names2.db
Solution 3:
Either the directory /data/data/com.example.namesgenerator/databases
doesn't exist or there is a problem with access rights (you are not allowed to create a file in the directory or you are not allowed to read or modify the already existing file)
Post a Comment for "Application Error On Phone But Not On Emulator"