Android Question ZoomageView error on LoadLayout

Discussion in 'Android Questions' started by db0070, Apr 21, 2019.

  1. db0070

    db0070 Active Member Licensed User

    I get an error when I loadlayout that contains a ZoomageView. If I remove Zoomageview, there is no error.
    I created a very simple new project and the error occurs at Loadlayout:-
    Code:
    Sub Activity_Create(FirstTime As Boolean)
        
    'Do not forget to load the layout file created with the visual designer. For example:
        Activity.LoadLayout("1")
    End Sub
    I am using Version 9 B4A.
    Layout 1.bal has just two views, a Panel and in the panel is ZoomageView.
    The error I am getting is:
    Code:
    Logger connected to:  samsung SM-P550
    --------- beginning of crash
    --------- beginning of main
    Error occurred on line: 
    28 (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 b4a.example.main._activity_create(main.java:
    382)
        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:
    6823)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:
    1563)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:
    1451)
    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)
        ... 
    18 more
    Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/jsibbold/zoomage/ZoomageView;
        at de.donmanfred.ZoomageViewWrapper._initialize(ZoomageViewWrapper.java:
    59)
        ... 
    21 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)
        ... 
    22 more
    Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v7/widget/AppCompatImageView;
        ... 
    22 more
    Caused by: java.lang.ClassNotFoundException: Didn
    't find class "android.support.v7.widget.AppCompatImageView" on path: DexPathList[[zip file "/data/app/b4a.example-1/base.apk"],nativeLibraryDirectories=[/data/app/b4a.example-1/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)
        ... 
    22 more
    ** 
    Activity (main) Resume **
    *** 
    Service (starter) Create ***
    ** 
    Service (starter) Start **
    ** 
    Activity (main) Create, isFirst = true **
    Error occurred on line: 
    28 (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 b4a.example.main._activity_create(main.java:
    382)
        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:
    6823)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:
    1563)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:
    1451)
    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)
        ... 
    18 more
    Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/jsibbold/zoomage/ZoomageView;
        at de.donmanfred.ZoomageViewWrapper._initialize(ZoomageViewWrapper.java:
    59)
        ... 
    21 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)
        ... 
    22 more
    Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v7/widget/AppCompatImageView;
        ... 
    22 more
    Caused by: java.lang.ClassNotFoundException: Didn
    't find class "android.support.v7.widget.AppCompatImageView" on path: DexPathList[[zip file "/data/app/b4a.example-1/base.apk"],nativeLibraryDirectories=[/data/app/b4a.example-1/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)
        ... 
    22 more
    ** 
    Activity (main) Resume **
    *** 
    Service (starter) Create ***
    ** 
    Service (starter) Start **
    ** 
    Activity (main) Create, isFirst = true **
    Error occurred on line: 
    28 (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 b4a.example.main._activity_create(main.java:
    382)
        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:
    6823)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:
    1563)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:
    1451)
    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)
        ... 
    18 more
    Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/jsibbold/zoomage/ZoomageView;
        at de.donmanfred.ZoomageViewWrapper._initialize(ZoomageViewWrapper.java:
    59)
        ... 
    21 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)
        ... 
    22 more
    Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v7/widget/AppCompatImageView;
        ... 
    22 more
    Caused by: java.lang.ClassNotFoundException: Didn
    't find class "android.support.v7.widget.AppCompatImageView" 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)
        ... 
    22 more
    ** 
    Activity (main) Resume **
    *** 
    Service (starter) Create ***
    ** 
    Service (starter) Start **
    ** 
    Activity (main) Create, isFirst = true **
    Error occurred on line: 
    28 (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 b4a.example.main._activity_create(main.java:
    382)
        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:
    6823)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:
    1563)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:
    1451)
    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)
        ... 
    18 more
    Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/jsibbold/zoomage/ZoomageView;
        at de.donmanfred.ZoomageViewWrapper._initialize(ZoomageViewWrapper.java:
    59)
        ... 
    21 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)
        ... 
    22 more
    Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v7/widget/AppCompatImageView;
        ... 
    22 more
    Caused by: java.lang.ClassNotFoundException: Didn
    't find class "android.support.v7.widget.AppCompatImageView" on path: DexPathList[[zip file "/data/app/b4a.example-1/base.apk"],nativeLibraryDirectories=[/data/app/b4a.example-1/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)
        ... 
    22 more
    ** 
    Activity (main) Resume **
    *** 
    Service (starter) Create ***
    ** 
    Service (starter) Start **
    ** 
    Activity (main) Create, isFirst = true **
    Error occurred on line: 
    28 (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 b4a.example.main._activity_create(main.java:
    382)
        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:
    6823)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:
    1563)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:
    1451)
    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)
        ... 
    18 more
    Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/jsibbold/zoomage/ZoomageView;
        at de.donmanfred.ZoomageViewWrapper._initialize(ZoomageViewWrapper.java:
    59)
        ... 
    21 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)
        ... 
    22 more
    Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v7/widget/AppCompatImageView;
        ... 
    22 more
    Caused by: java.lang.ClassNotFoundException: Didn
    't find class "android.support.v7.widget.AppCompatImageView" 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)
        ... 
    22 more
    ** 
    Activity (main) Resume **
     
  2. Brandsum

    Brandsum Active Member Licensed User

    Did you added #Extends: android.support.v7.app.AppCompatActivity in your main activity?

    Could you upload your project?
     
    Last edited: Apr 21, 2019
    DonManfred likes this.
  3. db0070

    db0070 Active Member Licensed User

    See enclosed - its a skeleton new project with just two views. I also tried updating B4A to version 9.01.2
     

    Attached Files:

  4. DonManfred

    DonManfred Expert Licensed User

    But you did NOT make it a appcompat activity.
     

    Attached Files:

    Brandsum likes this.
  5. Brandsum

    Brandsum Active Member Licensed User

    Yup as @DonManfred said and it's clearly mentioned on the library thread,

     
  6. db0070

    db0070 Active Member Licensed User

    O blast! Spent hours on this and even tried comparing to a published app I did only couple of months ago using zoomagview!!!
     
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