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

Discussion in 'Android Questions' started by Spyrex, Aug 4, 2019.

  1. Spyrex

    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!
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    Are you using B4A v9.3+ ? Have you ran the jetifier tool (Tools - Jetifier)?
    Clean the project (Ctrl + P) after running jetifier.
     
    luke2012 likes this.
  3. Spyrex

    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"
     
  4. Erel

    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.
     
    luke2012 likes this.
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