Camera2 Error - Java.Lang.ClassNotFoundException for CameraDevice.StateCallback

I'm trying to use Camera2 in a project working from the example here: https://github.com/xamarin/monodroid-samples/tree/master/android5.0/Camera2Basic/Camera2Basic

I have an implementation of CameraDevice.StateCallback called CameraStateListener, just like this example. However, whenever I load it up I get the following error:

        09-24 15:11:15.271 I/MonoDroid(15717): UNHANDLED EXCEPTION:
        09-24 15:11:15.291 I/MonoDroid(15717): Java.Lang.ClassNotFoundException: Exception of type 'Java.Lang.ClassNotFoundException' was thrown.
        09-24 15:11:15.291 I/MonoDroid(15717):   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000b] in /Users/builder/data/lanes/1978/f98871a9/source/mono/mcs/class/corlib/System.Runtime.ExceptionServices/ExceptionDispatchInfo.cs:61 
        09-24 15:11:15.291 I/MonoDroid(15717):   at Android.Runtime.JNIEnv.CallObjectMethod (IntPtr jobject, IntPtr jmethod, Android.Runtime.JValue* parms) [0x00064] in /Users/builder/data/lanes/1978/f98871a9/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.g.cs:195 
        09-24 15:11:15.291 I/MonoDroid(15717):   at Android.Runtime.JNIEnv.CallObjectMethod (IntPtr jobject, IntPtr jmethod, Android.Runtime.JValue[] parms) [0x0001d] in /Users/builder/data/lanes/1978/f98871a9/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.g.cs:203 
        09-24 15:11:15.291 I/MonoDroid(15717):   at Android.Runtime.JNIEnv.FindClass (System.String classname) [0x00007] in /Users/builder/data/lanes/1978/f98871a9/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.cs:493 
        09-24 15:11:15.291 I/MonoDroid(15717):   at Android.Runtime.JNIEnv.FindClass (System.Type type) [0x00009] in /Users/builder/data/lanes/1978/f98871a9/source/monodroid/src/Mono.Android/src/Runtime/JNIEnv.cs:434 
        09-24 15:11:15.291 I/MonoDroid(15717):   --- End of managed exception stack trace ---
        09-24 15:11:15.291 I/MonoDroid(15717): java.lang.ClassNotFoundException: Didn't find class "md5d96e9bb84edc6bba0d5984bab529e6f5.CameraStateListener" on path: DexPathList[[zip file "/data/app/com.fdn.myproject-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.fdd.myproject-1, /vendor/lib, /system/lib]]

Answers

  • MaansaMaansa USMember

    Sorry for resurrecting such an old thread but I'm running into this issue now as well. Did you happen to discover a workaround for this or an alternative? Let me know, thanks!

Sign In or Register to comment.