Android Question I get errors, when I try to make a sliding menu :(

Spyrex

New Member
Licensed User
When I try to make a sliding menu like in the example of that post: https://www.b4x.com/android/forum/threads/b4x-b4xdrawer-sliding-drawer.97828/#content

But it doesn't work :(


Error occurred on line: 228 (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.loggedin._activity_create(loggedin.java:363)
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.loggedin.afterFirstLayout(loggedin.java:104)
at b4a.example.loggedin.access$000(loggedin.java:17)
at b4a.example.loggedin$WaitForLayout.run(loggedin.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:6986)
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:1445)
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: Failed resolution of: Landroid/support/v7/widget/Toolbar;
at java.lang.Class.classForName(Native Method)
at java.lang.Class.forName(Class.java:453)
at java.lang.Class.forName(Class.java:378)
at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayoutHelper(LayoutBuilder.java:384)
at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayoutHelper(LayoutBuilder.java:453)
at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:148)
... 19 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-08V5QyfLxv8ta_Unn-axZg==/base.apk"],nativeLibraryDirectories=[/data/app/b4a.example-08V5QyfLxv8ta_Unn-axZg==/lib/arm64, /system/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)
... 25 more

Thank you for every answer!
 

Spyrex

New Member
Licensed User
Yes I am using B4A v9.3 but when I try to run the jetifier-tool there is a error like this: "Additional libraries folder not set"
 
Upvote 0

Erel

Administrator
Staff member
Licensed User
You shouldn't copy libraries to the internal libraries folder unless they are internal libraries (updates to libraries that are installed with B4A).

Create a folder for the additional libraries, not under Program Files. Configure the IDE to use it - Tools - Configure Paths.
Move the libraries you downloaded to this folder and then run the jetifier tool. Make sure NOT to leave copies in the internal libraries folder.
 
Upvote 0
Top