Java Question Custom View RuntimeException

Discussion in 'Libraries developers questions' started by PABLO2013, Apr 19, 2018.

  1. PABLO2013

    PABLO2013 Active Member Licensed User

    Greetings,
    I wanted to know if this error is due, because I can not compile this Custom View, tks


    Code:
    **************************** BaseApplication **************************
    *** 
    Service (starter) Create ***
    ** 
    Service (starter) Start **
    ** 
    Activity (main) Create, isFirst = true **
    main$ResumableSub_Activity_Createresume (java line: 
    383)
    java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
        at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:
    170)
        at anywheresoftware.b4a.objects.ActivityWrapper.LoadLayout(ActivityWrapper.java:
    209)
        at b4a.dji.test1.main$ResumableSub_Activity_Create.resume(main.java:
    383)
        at b4a.dji.test1.main._activity_create(main.java:
    358)
        at java.lang.reflect.Method.invoke(Native Method)
        at anywheresoftware.b4a.BA.raiseEvent2(BA.java:
    186)
        at b4a.dji.test1.main.afterFirstLayout(main.java:
    104)
        at b4a.dji.test1.main.access$
    000(main.java:17)
        at b4a.dji.test1.main$WaitForLayout.run(main.java:
    82)
        at android.os.Handler.handleCallback(Handler.java:
    751)
        at android.os.Handler.dispatchMessage(Handler.java:
    95)
        at android.os.Looper.loop(Looper.java:
    154)
        at android.app.ActivityThread.main(ActivityThread.java:
    6120)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:
    865)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:
    755)
    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:
    162)
        ... 
    15 more
    Caused by: android.view.InflateException: Binary XML 
    file line #5: Binary XML file line #5: Error inflating class dji.ui.internal.RecyclerListView
    Caused by: android.view.InflateException: Binary XML 
    file line #5: Error inflating class dji.ui.internal.RecyclerListView
    Caused by: java.lang.ClassNotFoundException: dji.ui.internal.RecyclerListView
        at java.lang.VMClassLoader.findLoadedClass(Native Method)
        at java.lang.ClassLoader.findLoadedClass(ClassLoader.java:
    742)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:
    362)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:
    312)
        at android.view.LayoutInflater.createView(LayoutInflater.java:
    609)
        at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:
    787)
        at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:
    727)
        at android.view.LayoutInflater.rInflate(LayoutInflater.java:
    858)
        at android.view.LayoutInflater.inflate(LayoutInflater.java:
    492)
        at android.view.LayoutInflater.inflate(LayoutInflater.java:
    426)
        at android.view.LayoutInflater.inflate(LayoutInflater.java:
    377)
        at dji.ui.base.o.initView(Unknown Source)
        at dji.ui.panel.PreFlightCheckListPanel.initView(Unknown Source)
        at dji.ui.base.p.<init>(Unknown Source)
        at dji.ui.base.o.<init>(Unknown Source)
        at dji.ui.panel.PreFlightCheckListPanel.<init>(Unknown Source)
        at dji.ui.panel.PreFlightCheckListPanel.<init>(Unknown Source)
        at anywheresoftware.b4a.objects.DJIPreFlightCheckListPanelWrapper._initialize(DJIPreFlightCheckListPanelWrapper.java:
    41)
        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:
    162)
        at anywheresoftware.b4a.objects.ActivityWrapper.LoadLayout(ActivityWrapper.java:
    209)
        at b4a.dji.test1.main$ResumableSub_Activity_Create.resume(main.java:
    383)
        at b4a.dji.test1.main._activity_create(main.java:
    358)
        at java.lang.reflect.Method.invoke(Native Method)
        at anywheresoftware.b4a.BA.raiseEvent2(BA.java:
    186)
        at b4a.dji.test1.main.afterFirstLayout(main.java:
    104)
        at b4a.dji.test1.main.access$
    000(main.java:17)
        at b4a.dji.test1.main$WaitForLayout.run(main.java:
    82)
        at android.os.Handler.handleCallback(Handler.java:
    751)
        at android.os.Handler.dispatchMessage(Handler.java:
    95)
        at android.os.Looper.loop(Looper.java:
    154)
        at android.app.ActivityThread.main(ActivityThread.java:
    6120)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:
    865)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:
    755)
    Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/suppo
    Message longer than 
    Log limit (4000). Message was truncated.
    (RuntimeException) java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
    ** 
    Activity (main) Resume **
     
  2. DonManfred

    DonManfred Expert Licensed User

    You should post java developer question in the right Subforum.

    I´ve asked Erel to move the Thread.

    Additional you should give us more information! Code, Library-Code, whatever may help... My Hourglas is´nt working....
     
  3. PABLO2013

    PABLO2013 Active Member Licensed User

    Thank you. The code is your library of dji ui, I had to lower it to 4.4.1, because in 4.5 it does not work, check the classes and the jar and it exists but it does not work for me either, I use this. #AdditionalJar: dji-sdk-provided-4.4.1(in 4.4.1 the widgets work but the panels do not), ReferenceOnly #AdditionalJar: dji-uilibrary-4.4.1, ReferenceOnly In the case of this panel this is the error that registers me, thank you.

    Code:
    package anywheresoftware.b4a.objects;

    import anywheresoftware.b4a.BA;
    import anywheresoftware.b4a.BA.Hide;
    import anywheresoftware.b4a.BA.ShortName;
    import anywheresoftware.b4a.keywords.Common.DesignerCustomView;
    import anywheresoftware.b4a.objects.CustomViewWrapper;
    import anywheresoftware.b4a.objects.LabelWrapper;
    import anywheresoftware.b4a.objects.PanelWrapper;
    import anywheresoftware.b4a.objects.ViewWrapper;
    import anywheresoftware.b4a.objects.collections.Map;
    import dji.keysdk.DJIKey;
    import dji.ui.panel.PreFlightCheckListPanel;

    @ShortName(
    "DJIPreFlightCheckListPanel")
    //@Permissions(values={
    "android.permission.INTERNET""android.permission.ACCESS_NETWORK_STATE"})
    //@Events(values={"onSigned(sign As Object)"})
    //@DependsOn(values={"android-viewbadger"})
    public class DJIPreFlightCheckListPanelWrapper extends ViewWrapper<PreFlightCheckListPanel>  implements DesignerCustomView {
        private BA ba;
        private String eventName;
      
        /*
         * Initialize the HTML-TextView
         */     
        public void Initialize(BA ba, String EventName) {
            _initialize(ba, null, EventName);
        }

        @Override
        public void DesignerCreateView(PanelWrapper base, LabelWrapper lw, Map props) {
            //getObject().setChecked((Boolean)props.Get("Checked"));
            CustomViewWrapper.replaceBaseWithView(base, getObject());
        }

      
        @Hide
        @Override
        public void _initialize(BA ba, Object activityClass, String EventName) {
            this.eventName = EventName.toLowerCase(BA.cul);
            this.ba = ba;
            this.setObject(new PreFlightCheckListPanel(ba.activity, null));
    //        getObject().initKey(); //yo
         }
     
    Last edited: Apr 19, 2018
Loading...
  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