Android Question ZoomageView Zoomage don't load Layout Caused by: java.lang.NoClassDefFoundError

birnesoft

Active Member
Licensed User
Longtime User
I get an error when I loadLayout

*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
Error occurred on line: 27 (Main)
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 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.zommage.main.afterFirstLayout(main.java:104)
at b4a.zommage.main.access$000(main.java:17)
at b4a.zommage.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:6682)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1520)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1410)
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)
... 17 more
Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/jsibbold/zoomage/ZoomageView;
at de.donmanfred.ZoomageViewWrapper._initialize(ZoomageViewWrapper.java:59)
... 20 more
Caused by: java.lang.ClassNotFoundException: com.jsibbold.zoomage.ZoomageView
at java.lang.VMClassLoader.findLoadedClass(Native Method)
at java.lang.ClassLoader.findLoadedClass(ClassLoader.java:742)
at java.lang.ClassLoader.loadClass(ClassLoader.java:362)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
... 21 more
Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v7/widget/AppCompatImageView;
... 21 more
Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.v7.widget.AppCompatImageView" on path: DexPathList[[zip file "/data/app/b4a.zommage-1/base.apk"],nativeLibraryDirectories=[/data/app/b4a.zommage-1/lib/arm64, /system/lib64, /vendor/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:380)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
... 21 more



B4X:
Sub Globals
    
    Private ZoomageView1 As ZoomageView
End Sub

Sub Activity_Create(FirstTime As Boolean)
    Activity.LoadLayout("2")

    Dim bd As BitmapDrawable
    bd.Initialize(LoadBitmap(File.DirAssets,"1.jpg"))
    bd.Gravity = Gravity.FILL

    ZoomageView1.ImageDrawable=bd
 
    
End Sub
 

DonManfred

Expert
Licensed User
Longtime User
Please upload a project which shows the issue.

Does the provided Example work for you?
 
Last edited:
Upvote 0
Top