Android Question B4XDrawer not working after update

Paolo Trevisiol

Member
Licensed User
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
Error occurred on line: 217 (B4XDrawer)
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:170)
at anywheresoftware.b4a.objects.PanelWrapper.LoadLayout(PanelWrapper.java:134)
at anywheresoftware.b4a.objects.B4XViewWrapper.LoadLayout(B4XViewWrapper.java:292)
at b4a.example.main._activity_create(main.java:391)
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:144)
at b4a.example.main.afterFirstLayout(main.java:104)
at b4a.example.main.access$000(main.java:17)
at b4a.example.main$WaitForLayout.run(main.java:82)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
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)
... 19 more
Caused by: java.lang.NoClassDefFoundError: de.amberhome.objects.internal.InternalToolbar
at de.amberhome.objects.appcompat.ACToolbarLightWrapper.innerInitialize(ACToolbarLightWrapper.java:28)
at anywheresoftware.b4a.objects.ViewWrapper.Initialize(ViewWrapper.java:67)
at de.amberhome.objects.appcompat.ACToolBarWrapper.Initialize(ACToolBarWrapper.java:66)
at de.amberhome.objects.appcompat.ACToolBarWrapper._initialize(ACToolBarWrapper.java:147)
... 22 more
 

DonManfred

Expert
Licensed User
You ran Jetifier, right?
yes
Do you get the same error with this example
yes. Just ran the example

Logger connected to: 988ad036525346515630
--------- beginning of crash
--------- beginning of main
--------- beginning of system
*** Service (starter) Create ***
** Service (starter) Start **
main_activity_create (java line: 344)
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.example.main._activity_create(main.java:344)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:196)
at b4a.example.main.afterFirstLayout(main.java:104)
at b4a.example.main.access$000(main.java:17)
at b4a.example.main$WaitForLayout.run(main.java:82)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7045)
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:964)
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)
... 14 more
Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v7/widget/Toolbar;
at b4a.example.main._globals(main.java:380)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:196)
at b4a.example.main.initializeGlobals(main.java:320)
at b4a.example.main.afterFirstLayout(main.java:101)
... 9 more
Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.v7.widget.Toolbar" on path: DexPathList[[zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/data/app/b4a.example-6l46kECP9W0w8awYQB38GA==/base.apk"],nativeLibraryDirectories=[/data/app/b4a.example-6l46kECP9W0w8awYQB38GA==/lib/arm64, /system/lib64, /system/vendor/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
... 14 more
 

Rubsanpe

Member
Licensed User
Hi, I'm using B4XDrawer in my application and I don't have any problems after upgrading to 9.30 and using Jetifier with all my libraries.

I just downloaded the example again and here it works well.

Rubén
 

Rubsanpe

Member
Licensed User
Hi. I just tested Android versions 4.4, 5.1 and 9. Maybe it could be a problem updating the SDK? I have it completely updated.

Rubén
 

DonManfred

Expert
Licensed User
My guess is that there is a copy of AppCompat.jar or .aar in your internal libraries folder.
No, the is no such file.

I just redownloaded Appcompat v4.0 and added them to the additional libs folder.

And in Additional libs are only the three provided files from the AppCompat Thread. V4.0

from the AppCompat.xml
<version>4.0</version>
<author>Markus Stipp</author>
<dependsOn>com.android.support:appcompat-v7</dependsOn>
<dependsOn>AppCompat.aar</dependsOn>


Jetifier does not find anything to Jetify.
 

techknight

Well-Known Member
Licensed User
Do I see a period in your folders? Get rid of that and try again. Windows hates weird characters like that.
 
Top