Android Question getting Error at AHNavigation Library

AndroidMadhu

Active Member
Licensed User
hello All,
I am getting error while running and compiling the AHNavigationlibrary.
The below error I am facing while compile and Run the program....
B4X:
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v4/widget/DrawerLayout$LayoutParams;
    at de.amberhome.navdrawer.NavigationDrawer.Initialize2(NavigationDrawer.java:82)
    at de.amberhome.navdrawer.NavigationDrawer.Initialize(NavigationDrawer.java:67)
    at b4a.example.main._activity_create(main.java:386)
    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:751)
    at android.os.Handler.dispatchMessage(Handler.java:95)
    at android.os.Looper.loop(Looper.java:154)
    at android.app.ActivityThread.main(ActivityThread.java:6119)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.v4.widget.DrawerLayout$LayoutParams" on path: DexPathList[[zip file "/data/app/b4a.example-2/base.apk"],nativeLibraryDirectories=[/data/app/b4a.example-2/lib/arm, /system/lib, /vendor/lib]]
    at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:380)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
    ... 19 more
** Activity (main) Resume **

The below is code:
B4X:
Sub Globals
    'These global variables will be redeclared each time the activity is created.
    'These variables can only be accessed from this module.
    Dim ahnavi As AHNavigationDrawer
End Sub

Sub Activity_Create(FirstTime As Boolean)
   
Activity.LoadLayout("test")
    ahnavi.Initialize("ahnavi",Activity,70%x)
    ahnavi.NavigationPanel.LoadLayout("Drawer")
    ahnavi.OpenDrawer
End Sub

But when I am running only the design it is running fine.
B4X:
Activity.LoadLayout("Drawer")
 
Last edited:
Top