Android Question CameraKit example throws error

JanG

Member
Licensed User
Longtime User
I tried the CameraKit example from @DonManfred, but without success.

I get the following error:
B4X:
Logger verbunden mit:  samsung SM-A405FN
--------- beginning of crash
--------- beginning of main
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v4/util/SparseArrayCompat;
 at com.wonderkiln.camerakit.ConstantMapper$Facing.<clinit>(ConstantMapper.java:61)
 at com.wonderkiln.camerakit.Camera1.setFacing(Camera1.java:178)
 at com.wonderkiln.camerakit.CameraView$3.run(CameraView.java:339)
 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.os.HandlerThread.run(HandlerThread.java:65)
Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.v4.util.SparseArrayCompat" on path: DexPathList[[zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/data/app/de.donmanfred.camerakit-RL_pYBOPIFc6lBGEoRDsqg==/base.apk"],nativeLibraryDirectories=[/data/app/de.donmanfred.camerakit-RL_pYBOPIFc6lBGEoRDsqg==/lib/arm64, /data/app/de.donmanfred.camerakit-RL_pYBOPIFc6lBGEoRDsqg==/base.apk!/lib/arm64-v8a, /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)
 ... 7 more
main$ResumableSub_Activity_Createresume (java line: 372)
java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v4/view/ViewCompat;
 at com.wonderkiln.camerakit.CameraView.onAttachedToWindow(CameraView.java:174)
 at android.view.View.dispatchAttachedToWindow(View.java:20001)
 at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3589)
 at android.view.ViewGroup.addViewInner(ViewGroup.java:5302)
 at android.view.ViewGroup.addView(ViewGroup.java:5090)
 at anywheresoftware.b4a.objects.CustomViewWrapper.replaceBaseWithView(CustomViewWrapper.java:109)
 at de.donmanfred.CameraKitwrapper.DesignerCreateView(CameraKitwrapper.java:87)
 at anywheresoftware.b4a.objects.CustomViewWrapper.AfterDesignerScript(CustomViewWrapper.java:70)
 at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:162)
 at anywheresoftware.b4a.objects.ActivityWrapper.LoadLayout(ActivityWrapper.java:209)
 at de.donmanfred.camerakit.main$ResumableSub_Activity_Create.resume(main.java:372)
 at de.donmanfred.camerakit.main._activity_create(main.java:348)
 at java.lang.reflect.Method.invoke(Native Method)
 at anywheresoftware.b4a.BA.raiseEvent2(BA.java:196)
 at de.donmanfred.camerakit.main.afterFirstLayout(main.java:104)
 at de.donmanfred.camerakit.main.access$000(main.java:17)
 at de.donmanfred.camerakit.main$WaitForLayout.run(main.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:7063)
 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:965)
Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.v4.view.ViewCompat" on path: DexPathList[[zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/data/app/de.donmanfred.camerakit-RL_pYBOPIFc6lBGEoRDsqg==/base.apk"],nativeLibraryDirectories=[/data/app/de.donmanfred.camerakit-RL_pYBOPIFc6lBGEoRDsqg==/lib/arm64, /data/app/de.donmanfred.camerakit-RL_pYBOPIFc6lBGEoRDsqg==/base.apk!/lib/arm64-v8a, /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)
 ... 24 more
Copying updated assets files (1)
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v4/util/SparseArrayCompat;
 at com.wonderkiln.camerakit.ConstantMapper$Facing.<clinit>(ConstantMapper.java:61)
 at com.wonderkiln.camerakit.Camera1.setFacing(Camera1.java:178)
 at com.wonderkiln.camerakit.CameraView$3.run(CameraView.java:339)
 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.os.HandlerThread.run(HandlerThread.java:65)
Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.v4.util.SparseArrayCompat" on path: DexPathList[[zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/data/app/de.donmanfred.camerakit-7ZqP1JOKqEnahgMSZNP8Kg==/base.apk"],nativeLibraryDirectories=[/data/app/de.donmanfred.camerakit-7ZqP1JOKqEnahgMSZNP8Kg==/lib/arm64, /data/app/de.donmanfred.camerakit-7ZqP1JOKqEnahgMSZNP8Kg==/base.apk!/lib/arm64-v8a, /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)
 ... 7 more
java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v4/view/ViewCompat;
 at com.wonderkiln.camerakit.CameraView.onAttachedToWindow(CameraView.java:174)
 at android.view.View.dispatchAttachedToWindow(View.java:20001)
 at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3589)
 at android.view.ViewGroup.addViewInner(ViewGroup.java:5302)
 at android.view.ViewGroup.addView(ViewGroup.java:5090)
 at anywheresoftware.b4a.objects.CustomViewWrapper.replaceBaseWithView(CustomViewWrapper.java:109)
 at de.donmanfred.CameraKitwrapper.DesignerCreateView(CameraKitwrapper.java:87)
 at anywheresoftware.b4a.objects.CustomViewWrapper.AfterDesignerScript(CustomViewWrapper.java:70)
 at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:162)
 at anywheresoftware.b4a.objects.ActivityWrapper.LoadLayout(ActivityWrapper.java:209)
 at de.donmanfred.camerakit.main$ResumableSub_Activity_Create.resume(main.java:413)
 at de.donmanfred.camerakit.main._activity_create(main.java:387)
 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 de.donmanfred.camerakit.main.afterFirstLayout(main.java:104)
 at de.donmanfred.camerakit.main.access$000(main.java:17)
 at de.donmanfred.camerakit.main$WaitForLayout.run(main.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:7063)
 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:965)
Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.v4.view.ViewCompat" on path: DexPathList[[zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/data/app/de.donmanfred.camerakit-7ZqP1JOKqEnahgMSZNP8Kg==/base.apk"],nativeLibraryDirectories=[/data/app/de.donmanfred.camerakit-7ZqP1JOKqEnahgMSZNP8Kg==/lib/arm64, /data/app/de.donmanfred.camerakit-7ZqP1JOKqEnahgMSZNP8Kg==/base.apk!/lib/arm64-v8a, /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)
 ... 28 more
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = true **
Service started in the background. Trying to start again in foreground mode.
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v4/util/SparseArrayCompat;
 at com.wonderkiln.camerakit.ConstantMapper$Facing.<clinit>(ConstantMapper.java:61)
 at com.wonderkiln.camerakit.Camera1.setFacing(Camera1.java:178)
 at com.wonderkiln.camerakit.CameraView$3.run(CameraView.java:339)
 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.os.HandlerThread.run(HandlerThread.java:65)
Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.v4.util.SparseArrayCompat" on path: DexPathList[[zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/data/app/de.donmanfred.camerakit-7ZqP1JOKqEnahgMSZNP8Kg==/base.apk"],nativeLibraryDirectories=[/data/app/de.donmanfred.camerakit-7ZqP1JOKqEnahgMSZNP8Kg==/lib/arm64, /data/app/de.donmanfred.camerakit-7ZqP1JOKqEnahgMSZNP8Kg==/base.apk!/lib/arm64-v8a, /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)
 ... 7 more
java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v4/view/ViewCompat;
 at com.wonderkiln.camerakit.CameraView.onAttachedToWindow(CameraView.java:174)
 at android.view.View.dispatchAttachedToWindow(View.java:20001)
 at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3589)
 at android.view.ViewGroup.addViewInner(ViewGroup.java:5302)
 at android.view.ViewGroup.addView(ViewGroup.java:5090)
 at anywheresoftware.b4a.objects.CustomViewWrapper.replaceBaseWithView(CustomViewWrapper.java:109)
 at de.donmanfred.CameraKitwrapper.DesignerCreateView(CameraKitwrapper.java:87)
 at anywheresoftware.b4a.objects.CustomViewWrapper.AfterDesignerScript(CustomViewWrapper.java:70)
 at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:162)
 at anywheresoftware.b4a.objects.ActivityWrapper.LoadLayout(ActivityWrapper.java:209)
 at de.donmanfred.camerakit.main$ResumableSub_Activity_Create.resume(main.java:413)
 at de.donmanfred.camerakit.main._activity_create(main.java:387)
 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 de.donmanfred.camerakit.main.afterFirstLayout(main.java:104)
 at de.donmanfred.camerakit.main.access$000(main.java:17)
 at de.donmanfred.camerakit.main$WaitForLayout.run(main.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:7063)
 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:965)
Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.v4.view.ViewCompat" on path: DexPathList[[zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/data/app/de.donmanfred.camerakit-7ZqP1JOKqEnahgMSZNP8Kg==/base.apk"],nativeLibraryDirectories=[/data/app/de.donmanfred.camerakit-7ZqP1JOKqEnahgMSZNP8Kg==/lib/arm64, /data/app/de.donmanfred.camerakit-7ZqP1JOKqEnahgMSZNP8Kg==/base.apk!/lib/arm64-v8a, /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)
 ... 28 more
** Activity (main) Resume **
Service started in the background. Trying to start again in foreground mode.
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v4/util/SparseArrayCompat;
 at com.wonderkiln.camerakit.ConstantMapper$Facing.<clinit>(ConstantMapper.java:61)
 at com.wonderkiln.camerakit.Camera1.setFacing(Camera1.java:178)
 at com.wonderkiln.camerakit.CameraView$3.run(CameraView.java:339)
 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.os.HandlerThread.run(HandlerThread.java:65)
Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.v4.util.SparseArrayCompat" on path: DexPathList[[zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/data/app/de.donmanfred.camerakit-7ZqP1JOKqEnahgMSZNP8Kg==/base.apk"],nativeLibraryDirectories=[/data/app/de.donmanfred.camerakit-7ZqP1JOKqEnahgMSZNP8Kg==/lib/arm64, /data/app/de.donmanfred.camerakit-7ZqP1JOKqEnahgMSZNP8Kg==/base.apk!/lib/arm64-v8a, /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)
 ... 7 more
java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v4/view/ViewCompat;
 at com.wonderkiln.camerakit.CameraView.onAttachedToWindow(CameraView.java:174)
 at android.view.View.dispatchAttachedToWindow(View.java:20001)
 at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3589)
 at android.view.ViewGroup.addViewInner(ViewGroup.java:5302)
 at android.view.ViewGroup.addView(ViewGroup.java:5090)
 at anywheresoftware.b4a.objects.CustomViewWrapper.replaceBaseWithView(CustomViewWrapper.java:109)
 at de.donmanfred.CameraKitwrapper.DesignerCreateView(CameraKitwrapper.java:87)
 at anywheresoftware.b4a.objects.CustomViewWrapper.AfterDesignerScript(CustomViewWrapper.java:70)
 at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:162)
 at anywheresoftware.b4a.objects.ActivityWrapper.LoadLayout(ActivityWrapper.java:209)
 at de.donmanfred.camerakit.main$ResumableSub_Activity_Create.resume(main.java:413)
 at de.donmanfred.camerakit.main._activity_create(main.java:387)
 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 de.donmanfred.camerakit.main.afterFirstLayout(main.java:104)
 at de.donmanfred.camerakit.main.access$000(main.java:17)
 at de.donmanfred.camerakit.main$WaitForLayout.run(main.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:7063)
 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:965)
Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.v4.view.ViewCompat" on path: DexPathList[[zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/data/app/de.donmanfred.camerakit-7ZqP1JOKqEnahgMSZNP8Kg==/base.apk"],nativeLibraryDirectories=[/data/app/de.donmanfred.camerakit-7ZqP1JOKqEnahgMSZNP8Kg==/lib/arm64, /data/app/de.donmanfred.camerakit-7ZqP1JOKqEnahgMSZNP8Kg==/base.apk!/lib/arm64-v8a, /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)
 ... 28 more
** Activity (main) Resume **
Service started in the background. Trying to start again in foreground mode.
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v4/util/SparseArrayCompat;
 at com.wonderkiln.camerakit.ConstantMapper$Facing.<clinit>(ConstantMapper.java:61)
 at com.wonderkiln.camerakit.Camera1.setFacing(Camera1.java:178)
 at com.wonderkiln.camerakit.CameraView$3.run(CameraView.java:339)
 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.os.HandlerThread.run(HandlerThread.java:65)
Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.v4.util.SparseArrayCompat" on path: DexPathList[[zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/data/app/de.donmanfred.camerakit-7ZqP1JOKqEnahgMSZNP8Kg==/base.apk"],nativeLibraryDirectories=[/data/app/de.donmanfred.camerakit-7ZqP1JOKqEnahgMSZNP8Kg==/lib/arm64, /data/app/de.donmanfred.camerakit-7ZqP1JOKqEnahgMSZNP8Kg==/base.apk!/lib/arm64-v8a, /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)
 ... 7 more
java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v4/view/ViewCompat;
 at com.wonderkiln.camerakit.CameraView.onAttachedToWindow(CameraView.java:174)
 at android.view.View.dispatchAttachedToWindow(View.java:20001)
 at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3589)
 at android.view.ViewGroup.addViewInner(ViewGroup.java:5302)
 at android.view.ViewGroup.addView(ViewGroup.java:5090)
 at anywheresoftware.b4a.objects.CustomViewWrapper.replaceBaseWithView(CustomViewWrapper.java:109)
 at de.donmanfred.CameraKitwrapper.DesignerCreateView(CameraKitwrapper.java:87)
 at anywheresoftware.b4a.objects.CustomViewWrapper.AfterDesignerScript(CustomViewWrapper.java:70)
 at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:162)
 at anywheresoftware.b4a.objects.ActivityWrapper.LoadLayout(ActivityWrapper.java:209)
 at de.donmanfred.camerakit.main$ResumableSub_Activity_Create.resume(main.java:413)
 at de.donmanfred.camerakit.main._activity_create(main.java:387)
 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 de.donmanfred.camerakit.main.afterFirstLayout(main.java:104)
 at de.donmanfred.camerakit.main.access$000(main.java:17)
 at de.donmanfred.camerakit.main$WaitForLayout.run(main.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:7063)
 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:965)
Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.v4.view.ViewCompat" on path: DexPathList[[zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/data/app/de.donmanfred.camerakit-7ZqP1JOKqEnahgMSZNP8Kg==/base.apk"],nativeLibraryDirectories=[/data/app/de.donmanfred.camerakit-7ZqP1JOKqEnahgMSZNP8Kg==/lib/arm64, /data/app/de.donmanfred.camerakit-7ZqP1JOKqEnahgMSZNP8Kg==/base.apk!/lib/arm64-v8a, /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)
 ... 28 more
** Activity (main) Resume **
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v4/util/SparseArrayCompat;
 at com.wonderkiln.camerakit.ConstantMapper$Facing.<clinit>(ConstantMapper.java:61)
 at com.wonderkiln.camerakit.Camera1.setFacing(Camera1.java:178)
 at com.wonderkiln.camerakit.CameraView$3.run(CameraView.java:339)
 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.os.HandlerThread.run(HandlerThread.java:65)
Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.v4.util.SparseArrayCompat" on path: DexPathList[[zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/data/app/de.donmanfred.camerakit-7ZqP1JOKqEnahgMSZNP8Kg==/base.apk"],nativeLibraryDirectories=[/data/app/de.donmanfred.camerakit-7ZqP1JOKqEnahgMSZNP8Kg==/lib/arm64, /data/app/de.donmanfred.camerakit-7ZqP1JOKqEnahgMSZNP8Kg==/base.apk!/lib/arm64-v8a, /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)
 ... 7 more
java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v4/view/ViewCompat;
 at com.wonderkiln.camerakit.CameraView.onAttachedToWindow(CameraView.java:174)
 at android.view.View.dispatchAttachedToWindow(View.java:20001)
 at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3589)
 at android.view.ViewGroup.addViewInner(ViewGroup.java:5302)
 at android.view.ViewGroup.addView(ViewGroup.java:5090)
 at anywheresoftware.b4a.objects.CustomViewWrapper.replaceBaseWithView(CustomViewWrapper.java:109)
 at de.donmanfred.CameraKitwrapper.DesignerCreateView(CameraKitwrapper.java:87)
 at anywheresoftware.b4a.objects.CustomViewWrapper.AfterDesignerScript(CustomViewWrapper.java:70)
 at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:162)
 at anywheresoftware.b4a.objects.ActivityWrapper.LoadLayout(ActivityWrapper.java:209)
 at de.donmanfred.camerakit.main$ResumableSub_Activity_Create.resume(main.java:413)
 at de.donmanfred.camerakit.main._activity_create(main.java:387)
 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 de.donmanfred.camerakit.main.afterFirstLayout(main.java:104)
 at de.donmanfred.camerakit.main.access$000(main.java:17)
 at de.donmanfred.camerakit.main$WaitForLayout.run(main.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:7063)
 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:965)
Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.v4.view.ViewCompat" on path: DexPathList[[zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/data/app/de.donmanfred.camerakit-7ZqP1JOKqEnahgMSZNP8Kg==/base.apk"],nativeLibraryDirectories=[/data/app/de.donmanfred.camerakit-7ZqP1JOKqEnahgMSZNP8Kg==/lib/arm64, /data/app/de.donmanfred.camerakit-7ZqP1JOKqEnahgMSZNP8Kg==/base.apk!/lib/arm64-v8a, /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)
 ... 28 more
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = true **
** Service (starter) Destroy (ignored)**
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v4/util/SparseArrayCompat;
 at com.wonderkiln.camerakit.ConstantMapper$Facing.<clinit>(ConstantMapper.java:61)
 at com.wonderkiln.camerakit.Camera1.setFacing(Camera1.java:178)
 at com.wonderkiln.camerakit.CameraView$3.run(CameraView.java:339)
 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.os.HandlerThread.run(HandlerThread.java:65)
Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.v4.util.SparseArrayCompat" on path: DexPathList[[zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/data/app/de.donmanfred.camerakit-tSiTuSPN85W9KkFanoJt1Q==/base.apk"],nativeLibraryDirectories=[/data/app/de.donmanfred.camerakit-tSiTuSPN85W9KkFanoJt1Q==/lib/arm64, /data/app/de.donmanfred.camerakit-tSiTuSPN85W9KkFanoJt1Q==/base.apk!/lib/arm64-v8a, /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)
 ... 7 more
java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v4/view/ViewCompat;
 at com.wonderkiln.camerakit.CameraView.onAttachedToWindow(CameraView.java:174)
 at android.view.View.dispatchAttachedToWindow(View.java:20001)
 at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3589)
 at android.view.ViewGroup.addViewInner(ViewGroup.java:5302)
 at android.view.ViewGroup.addView(ViewGroup.java:5090)
 at anywheresoftware.b4a.objects.CustomViewWrapper.replaceBaseWithView(CustomViewWrapper.java:109)
 at de.donmanfred.CameraKitwrapper.DesignerCreateView(CameraKitwrapper.java:87)
 at anywheresoftware.b4a.objects.CustomViewWrapper.AfterDesignerScript(CustomViewWrapper.java:70)
 at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:162)
 at anywheresoftware.b4a.objects.ActivityWrapper.LoadLayout(ActivityWrapper.java:209)
 at de.donmanfred.camerakit.main$ResumableSub_Activity_Create.resume(main.java:413)
 at de.donmanfred.camerakit.main._activity_create(main.java:387)
 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 de.donmanfred.camerakit.main.afterFirstLayout(main.java:104)
 at de.donmanfred.camerakit.main.access$000(main.java:17)
 at de.donmanfred.camerakit.main$WaitForLayout.run(main.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:7063)
 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:965)
Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.v4.view.ViewCompat" on path: DexPathList[[zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/data/app/de.donmanfred.camerakit-tSiTuSPN85W9KkFanoJt1Q==/base.apk"],nativeLibraryDirectories=[/data/app/de.donmanfred.camerakit-tSiTuSPN85W9KkFanoJt1Q==/lib/arm64, /data/app/de.donmanfred.camerakit-tSiTuSPN85W9KkFanoJt1Q==/base.apk!/lib/arm64-v8a, /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)
 ... 28 more
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = true **
Service started in the background. Trying to start again in foreground mode.
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v4/util/SparseArrayCompat;
 at com.wonderkiln.camerakit.ConstantMapper$Facing.<clinit>(ConstantMapper.java:61)
 at com.wonderkiln.camerakit.Camera1.setFacing(Camera1.java:178)
 at com.wonderkiln.camerakit.CameraView$3.run(CameraView.java:339)
 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.os.HandlerThread.run(HandlerThread.java:65)
Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.v4.util.SparseArrayCompat" on path: DexPathList[[zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/data/app/de.donmanfred.camerakit-tSiTuSPN85W9KkFanoJt1Q==/base.apk"],nativeLibraryDirectories=[/data/app/de.donmanfred.camerakit-tSiTuSPN85W9KkFanoJt1Q==/lib/arm64, /data/app/de.donmanfred.camerakit-tSiTuSPN85W9KkFanoJt1Q==/base.apk!/lib/arm64-v8a, /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)
 ... 7 more
java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v4/view/ViewCompat;
 at com.wonderkiln.camerakit.CameraView.onAttachedToWindow(CameraView.java:174)
 at android.view.View.dispatchAttachedToWindow(View.java:20001)
 at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3589)
 at android.view.ViewGroup.addViewInner(ViewGroup.java:5302)
 at android.view.ViewGroup.addView(ViewGroup.java:5090)
 at anywheresoftware.b4a.objects.CustomViewWrapper.replaceBaseWithView(CustomViewWrapper.java:109)
 at de.donmanfred.CameraKitwrapper.DesignerCreateView(CameraKitwrapper.java:87)
 at anywheresoftware.b4a.objects.CustomViewWrapper.AfterDesignerScript(CustomViewWrapper.java:70)
 at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:162)
 at anywheresoftware.b4a.objects.ActivityWrapper.LoadLayout(ActivityWrapper.java:209)
 at de.donmanfred.camerakit.main$ResumableSub_Activity_Create.resume(main.java:413)
 at de.donmanfred.camerakit.main._activity_create(main.java:387)
 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 de.donmanfred.camerakit.main.afterFirstLayout(main.java:104)
 at de.donmanfred.camerakit.main.access$000(main.java:17)
 at de.donmanfred.camerakit.main$WaitForLayout.run(main.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:7063)
 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:965)
Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.v4.view.ViewCompat" on path: DexPathList[[zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/data/app/de.donmanfred.camerakit-tSiTuSPN85W9KkFanoJt1Q==/base.apk"],nativeLibraryDirectories=[/data/app/de.donmanfred.camerakit-tSiTuSPN85W9KkFanoJt1Q==/lib/arm64, /data/app/de.donmanfred.camerakit-tSiTuSPN85W9KkFanoJt1Q==/base.apk!/lib/arm64-v8a, /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)
 ... 28 more
** Activity (main) Resume **

Any ideas?
 

JanG

Member
Licensed User
Longtime User
Thanks @Erel, that was it!

I tried to find a camera example in b4a with working tap-to-focus. Tapping works (the white circle), but focussing does not work. It is the same with the CameraKit example in the Store.

Is there any working camera example with focussing by tapping on the screen?
 
Upvote 0

Brandsum

Well-Known Member
Licensed User
Thanks @Erel, that was it!

I tried to find a camera example in b4a with working tap-to-focus. Tapping works (the white circle), but focussing does not work. It is the same with the CameraKit example in the Store.

Is there any working camera example with focussing by tapping on the screen?

Yes recently I have created a camera activity with selfie filters, tap to focus/exposure, smooth drawing over taken photo with changeable brush size and color. But unfortunately I cant post it before the next week!
 
Upvote 0

JanG

Member
Licensed User
Longtime User
@Brandsum: That sounds good! What technology do you use? Camera2, CameraKit? Or did you wrap another library? Will you post the sourcecode?

@DonManfred: Does tap-to-focus work perfectly in your tests with CameraKit? I have another problem with CameraKit. It takes minutes until the camera preview is shown when starting the app. CameraKit does not work properly in my environment? Did you have a better experience?
 
Upvote 0
Top