Android Question [SOLVED] Error when loading Layout

Discussion in 'Android Questions' started by Vinians2006, Jul 18, 2019.

  1. Vinians2006

    Vinians2006 Active Member Licensed 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:
    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(
    at anywheresoftware.b4a.objects.ActivityWrapper.LoadLayout(
    at java.lang.reflect.Method.invoke(Native Method)
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.ShellBA.raiseEvent2(
    at com.xcreator.easycollector.readbarcode.afterFirstLayout(
    at com.xcreator.easycollector.readbarcode.access$000(
    at com.xcreator.easycollector.readbarcode$
    at android.os.Handler.handleCallback(
    at android.os.Handler.dispatchMessage(
    at android.os.Looper.loop(
    at java.lang.reflect.Method.invoke(Native Method)
    Caused by: java.lang.reflect.InvocationTargetException
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.objects.CustomViewWrapper.AfterDesignerScript(
    at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(
    ... 17 more
    Caused by: android.content.res.Resources$NotFoundException: Resource ID #0x0
    at android.content.res.ResourcesImpl.getValue(
    at android.content.res.Resources.loadXmlResourceParser(
    at android.content.res.Resources.getLayout(
    at android.view.LayoutInflater.inflate(
    at android.view.LayoutInflater.inflate(
    at zxscanwrapper.zxScanWrapper._initialize(
    ... 20 more
    ** Activity (readbarcode) Resume **
    ** Activity (main) Create, isFirst = true **
    ** Activity (main) Resume **
    ** Activity (main) Pause, UserClosed = false **
    Last edited: Jul 19, 2019
  2. DonManfred

    DonManfred Expert Licensed User

    You are missing adding a resourcefolder or something.
    Check the Library thread of zxScanWrapper and see how the example is build.
    José J. Aguilar and Vinians2006 like this.
  3. Vinians2006

    Vinians2006 Active Member Licensed User

    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!
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice