Android Question Error in loading image in web view

manuaaa

Member
Licensed User
Longtime User
Hi,
I am getting the following error while loading image in web view - please help
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create (first time) **
** Activity (main) Resume **
*** Service (tim) Create ***
** Service (tim) Start **
** Activity (main) Pause, UserClosed = false **
** Activity (master1) Create (first time) **
** Activity (master1) Resume **
** Activity (master1) Pause, UserClosed = false **
** Activity (photoupload) Create (first time) **
** Activity (photoupload) Resume **
findCamera
null
2
facing: 0, 0
findCamera
0
2
facing: 0, 0
90
[Height=480, IsInitialized=false, Width=640
]
** Activity (photoupload) Pause, UserClosed = true **
** Activity (pictureprivew) Create (first time) **
Error occurred on line: 182 (pictureprivew)
java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4j.object.JavaObject.RunMethod(JavaObject.java:132)
at b4a.example.pictureprivew._webviewassetfile(pictureprivew.java:500)
at b4a.example.pictureprivew._activity_create(pictureprivew.java:467)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:732)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:351)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:157)
at b4a.example.pictureprivew.afterFirstLayout(pictureprivew.java:105)
at b4a.example.pictureprivew.access$000(pictureprivew.java:17)
at b4a.example.pictureprivew$WaitForLayout.run(pictureprivew.java:83)
at android.os.Handler.handleCallback(Handler.java:815)
at android.os.Handler.dispatchMessage(Handler.java:104)
at android.os.Looper.loop(Looper.java:207)
at android.app.ActivityThread.main(ActivityThread.java:5765)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:679)
Caused by: java.io.FileNotFoundException: /data/user/0/b4a.example/files/virtual_assets/image.jpg: open failed: ENOENT (No such file or directory)
at libcore.io.IoBridge.open(IoBridge.java:487)
at java.io.FileInputStream.<init>(FileInputStream.java:76)
at anywheresoftware.b4a.objects.streams.File.OpenInput(File.java:205)
at anywheresoftware.b4a.objects.streams.File.Copy(File.java:341)
at anywheresoftware.b4a.objects.streams.File.getUnpackedVirtualAssetFile(File.java:352)
... 20 more
Caused by: android.system.ErrnoException: open failed: ENOENT (No such file or directory)
at libcore.io.Posix.open(Native Method)
at libcore.io.BlockGuardOs.open(BlockGuardOs.java:186)
at libcore.io.IoBridge.open(IoBridge.java:473)
... 24 more
** Activity (pictureprivew) Resume **
 

BlueVision

Active Member
Licensed User
Longtime User
Without a snippet of your code it is hard to decide the cause of your error.
Eventually it depends also on the APK-level of your program defined in the manifest. If the pathname pointing to the picture is correct and the picture exists there, access to this path may be restricted by Android itself on newer versions. Lowering down the APK-level to 29 could help in this case.
 
Upvote 0
Top