Android Question When I run Program Then It show the Error.

Vivek Bhatt

Member
Licensed User
When I run Program then it show me error.
i will try to solve this error and find the tutorials or any guide but its not find.
Logger connected to: emulator-5554
*** Service (starter) Create ***
Error occurred on line: 25 (Starter)
java.io.FileNotFoundException: /mnt/sdcard/Android/data/b4a.example/files/virtual_assets/data.db (No such file or directory)
at org.apache.harmony.luni.platform.OSFileSystem.open(Native Method)
at dalvik.system.BlockGuard$WrappedFileSystem.open(BlockGuard.java:232)
at java.io.FileInputStream.<init>(FileInputStream.java:80)
at anywheresoftware.b4a.objects.streams.File.OpenInput(File.java:199)
at anywheresoftware.b4a.objects.streams.File.Copy(File.java:335)
at b4a.example.starter._service_create(starter.java:178)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:710)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:339)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:249)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:139)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:166)
at b4a.example.starter.onCreate(starter.java:55)
at android.app.ActivityThread.handleCreateService(ActivityThread.java:1920)
at android.app.ActivityThread.access$2500(ActivityThread.java:117)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:982)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:3647)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
at dalvik.system.NativeStart.main(Native Method)
** Service (starter) Start **
 

JakeBullet70

Well-Known Member
Licensed User
Longtime User
It cannot find the file: data.db
Is there a data.db in your files folder? If so it needs to be copied to a working folder before you open it.
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
1. Post log in quote tags!
2. Hiding the code you are using does NOT HELP. Upload a small sample project which shoes the problem.
3. Use a real device instead of the Emulator. Does the emulator have an SDCard? Based on the error it can not find the file data.db inside the files folder
 
Upvote 0

Vivek Bhatt

Member
Licensed User
1. Post log in quote tags!
2. Hiding the code you are using does NOT HELP. Upload a small sample project which shoes the problem.
3. Use a real device instead of the Emulator. Does the emulator have an SDCard? Based on the error it can not find the file data.db inside the files folder
Yes Sir Emulator have an SD Card.
 
Upvote 0
Top