Android Question [SOLVED] Error when loading Layout

Vinians2006

Active Member
Licensed User
Longtime User
Hello my friends, sudenly I started to get an error when entering the scanning sctivity the message is in the image, the error is in Java line. Since its is on a Java line I cant debug! The image bellow, shows the error:
Screenshot_20190718-155245.png
More information about the error:

This occurs even before I load the Activity, Basic4Android seems to load all activity automatically ?

This is the Log:
Logger connected to: motorola moto g(6)
** Activity (scan) Resume **
** Activity (scan) Pause, UserClosed = false **
** Activity (readbarcode) Create, isFirst = true **
Error occurred on line: 22 (ReadBarcode)
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:166)
at anywheresoftware.b4a.objects.ActivityWrapper.LoadLayout(ActivityWrapper.java:209)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:710)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:342)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:249)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:139)
at com.xcreator.easycollector.readbarcode.afterFirstLayout(readbarcode.java:102)
at com.xcreator.easycollector.readbarcode.access$000(readbarcode.java:17)
at com.xcreator.easycollector.readbarcode$WaitForLayout.run(readbarcode.java:80)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6923)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:870)
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.objects.CustomViewWrapper.AfterDesignerScript(CustomViewWrapper.java:64)
at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:158)
... 17 more
Caused by: android.content.res.Resources$NotFoundException: Resource ID #0x0
at android.content.res.ResourcesImpl.getValue(ResourcesImpl.java:216)
at android.content.res.Resources.loadXmlResourceParser(Resources.java:2155)
at android.content.res.Resources.getLayout(Resources.java:1155)
at android.view.LayoutInflater.inflate(LayoutInflater.java:421)
at android.view.LayoutInflater.inflate(LayoutInflater.java:374)
at eu.livotov.labs.android.camview.ScannerLiveView.initUI(ScannerLiveView.java:64)
at eu.livotov.labs.android.camview.ScannerLiveView.<init>(ScannerLiveView.java:59)
at zxscanwrapper.zxScanWrapper._initialize(zxScanWrapper.java:76)
... 20 more
** Activity (readbarcode) Resume **
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
 
Last edited:

DonManfred

Expert
Licensed User
Longtime User
Caused by: android.content.res.Resources$NotFoundException: Resource ID #0x0
You are missing adding a resourcefolder or something.
Check the Library thread of zxScanWrapper and see how the example is build.
 
Upvote 0

Vinians2006

Active Member
Licensed User
Longtime User
You are missing adding a resourcefolder or something.
Check the Library thread of zxScanWrapper and see how the example is build.
Yes exactly, because I moved my project folder some files that were read only was deleted, I forgot this little detail. This is a odd thing about this component. Thank you!
 
Upvote 0
Top