Android Question B4XDrawer not working after update

techknight

Well-Known Member
Licensed User
Perhaps a picture would be of assistance. For grins and giggles, I would get rid of that period and re-point your paths, re-jetify, and try again.
 

Attachments

Last edited:

Jorge M A

Active Member
Licensed User
Tested and working Ok:
  • KitKat
  • Lollipop
  • Nougat
  • targetSdkVersion="26" and
  • targetSdkVersion="29"
platforms
  • android-26
  • android-29
  • Debug and
  • Release modes.
Additional libs path with and without "period" (mine is always with "dash" "B4X-AdditionalLibs", and it's ok.)
 
Last edited:

Erel

Administrator
Staff member
Licensed User
Look for a file named AppCompat.androidx.aar and delete it. Run jetifier again. It should list AppCompat.aar. Jetify it and clean the project.
 

DonManfred

Expert
Licensed User
I was sure this is not the issue
I would get rid of that period and re-point your paths, re-jetify, and try again
but i tried it



I setup a new copy of readytorunsdk, changed the path to the addlibs folder so both are not using any dot in the path.

The error is the same.
Logger connected to: 988ad036525346515630
--------- beginning of crash
--------- beginning of main
--------- beginning of system
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
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:7050)
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:965)
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-3iJNZUIssPqcfBWM0qnxdg==/base.apk"],nativeLibraryDirectories=[/data/app/b4a.example-3iJNZUIssPqcfBWM0qnxdg==/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
 

DonManfred

Expert
Licensed User
Look for a file named AppCompat.androidx.aar and delete it.
There is no such file.
If i search the addlibs folder for appcompat.* i get one xml, one jar (20 bytes) and one aar (about 80kb)

Run jetifier again.
Jetifier dos not find anything to do. Even when i redownload the appcompat 4 lib and extract them to addlibs folder.
It should list AppCompat.aar
No it does not. At least for me. Even after new download an extract them again overwriting the files available.

Cleaning project does not help either.
 

DonManfred

Expert
Licensed User
Delete jetifier.map from the additional libraries folder and run jetifier again. Is AppCompat.aar listed?
Yes
Now it lists. Appcompat.jar and Appcompat.aar (beside a lot of others).

I ran Jetifier and let it work.
I cleaned the project.
And compile it again. NOW the AppCompat Example does not crash anymore. It now works. :)
Thank you!
 

techknight

Well-Known Member
Licensed User
I was sure this is not the issue

but i tried it



I setup a new copy of readytorunsdk, changed the path to the addlibs folder so both are not using any dot in the path.

The error is the same.
Maybe not, but ive seen oddball characters in folder names cause weird issues for me in windows, especially with syncing and fileservers. Just wanted to rule it out.
 
Top