Java.Lang.ClassNotFoundException: Didn't find class "mp.MpUtils"

VuyiswaMasekoVuyiswaMaseko ✭✭USMember ✭✭
edited September 17 in Xamarin.Android

Good Day All

I have .Jar file that i am consuming via Xamarin, created an "Android Binding Library" Project and referenced it on the Android Project. Gave properly build type on the Jar and everything compiles ok . Enabled "ProGuard" , below added the following "-keep class mp.** { *; }" and built the project , it goes well with no errors. when i run it on this line

MpUtils.EnablePaymentBroadcast(m_context, "com.simsip.permission.PAYMENT_BROADCAST_PERMISSION");

i get an error

{Java.Lang.ClassNotFoundException: Didn't find class "mp.MpUtils" on path: DexPathList[[zip file "/data/app/com.companyname.FortumoDemo-1/base.apk"],nativeLibraryDirectories=[/data/app/com.companyname.FortumoDemo-1/lib/arm64, /data/app/com.companyname.FortumoDemo-1/base.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64]]
at Java.Interop.JniEnvironment+Types.FindClass (System.String classname) [0x00114] in <212d71eb7ebe48a08a28594a6b73aa4b>:0
at Java.Interop.JniType..ctor (System.String classname) [0x00006] in <212d71eb7ebe48a08a28594a6b73aa4b>:0
at Java.Interop.JniType.GetCachedJniType (Java.Interop.JniType& cachedType, System.String classname) [0x00018] in <212d71eb7ebe48a08a28594a6b73aa4b>:0
at Java.Interop.JniPeerMembers.get_JniPeerType () [0x0000c] in <212d71eb7ebe48a08a28594a6b73aa4b>:0
at Java.Interop.JniPeerMembers+JniStaticMethods.GetMethodInfo (System.String encodedMember) [0x0002b] in <212d71eb7ebe48a08a28594a6b73aa4b>:0
at Java.Interop.JniPeerMembers+JniStaticMethods.InvokeVoidMethod (System.String encodedMember, Java.Interop.JniArgumentValue* parameters) [0x00000] in <212d71eb7ebe48a08a28594a6b73aa4b>:0
at MP.MpUtils.EnablePaymentBroadcast (Android.Content.Context p0, System.String p1) [0x00043] in C:\DEVELOPMENT\FortumoDemo\Fortumo\obj\Debug\generated\src\MP.MpUtils.cs:75
at InApp.Droid.Services.FortumoInAppService.PurchaseProduct (System.String productId) [0x00008] in C:\DEVELOPMENT\FortumoDemo\FortumoDemo\FortumoDemo.Android\Services\FortumoInappService.cs:147
--- End of managed Java.Lang.ClassNotFoundException stack trace ---
java.lang.ClassNotFoundException: Didn't find class "mp.MpUtils" on path: DexPathList[[zip file "/data/app/com.companyname.FortumoDemo-1/base.apk"],nativeLibraryDirectories=[/data/app/com.companyname.FortumoDemo-1/lib/arm64, /data/app/com.companyname.FortumoDemo-1/base.apk!/lib/arm64-v8a, /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)
at md58432a647068b097f9637064b8985a5e0.ButtonRenderer_ButtonClickListener.n_onClick(Native Method)
at md58432a647068b097f9637064b8985a5e0.ButtonRenderer_ButtonClickListener.onClick(ButtonRenderer_ButtonClickListener.java:30)
at android.view.View.performClick(View.java:5647)
at android.view.View$PerformClick.run(View.java:22465)
at android.os.Handler.handleCallback(Handler.java:754)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:163)
at android.app.ActivityThread.main(ActivityThread.java:6238)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:933)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:823)
}

Thanks

Best Answer

Answers

Sign In or Register to comment.