I am working on an android app using Xamarin and receive the following exception.
Xamarin caused by: android.runtime.JavaProxyThrowable: System.ArgumentException: Handle must be valid.
Parameter name: instance
at Java.Interop.JniEnvironment+InstanceMethods.CallVoidMethod (Java.Interop.JniObjectReference instance, Java.Interop.JniMethodInfo method, Java.Interop.JniArgumentValue* args) [0x0000d] in <1bc3ec2e392f4f1a8cde1c9a163d2a4a>:0
at Android.Runtime.JNIEnv.CallVoidMethod (System.IntPtr jobject, System.IntPtr jmethod, Android.Runtime.JValue* parms) [0x0000e] in <0ce7e7a03dfb4c4b87eaf38b0e480d65>:0
at Android.Support.V4.Widget.SwipeRefreshLayout.set_Refreshing (System.Boolean value) [0x00060] in <27c17fe440cf491ba8255bcefade6e02>:0
at Xamarin.Forms.Platform.Android.ListViewRenderer.<UpdateIsRefreshing>b__25_0 () [0x00000] in <a3e44144fef249b0888b761605dfca24>:0
at Java.Lang.Thread+RunnableImplementor.Run () [0x0000b] in <0ce7e7a03dfb4c4b87eaf38b0e480d65>:0
at Java.Lang.IRunnableInvoker.n_Run (System.IntPtr jnienv, System.IntPtr native__this) [0x00009] in <0ce7e7a03dfb4c4b87eaf38b0e480d65>:0
at (wrapper dynamic-method) System.Object:ffc21647-8320-4065-b329-c8e7939eb92d (intptr,intptr)
at mono.java.lang.RunnableImplementor.n_run(Native Method)
at mono.java.lang.RunnableImplementor.run(RunnableImplementor.java:30)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
I've tried adding a txt file, environment.txt, with the property to set the GC to old. However that did not work.
What other issues could cause this exception?
Related
After update to xamarin forms 3.6->4.2, prism.Autofac.Forms 7.0->7.1, and xamarin.android.support.% 28.0.0.1->28.0.0.3 I'm getting
System.TypeLoadException
Message=VTable setup of type Prism.Autofac.AutofacContainerExtension failed
stack trace:
at Prism.PrismApplicationBase.Initialize () [0x00000] in d:\a\1\s\Source\Xamarin\Prism.Forms\PrismApplicationBase.cs:130
at Prism.PrismApplicationBase.InitializeInternal () [0x00006] in d:\a\1\s\Source\Xamarin\Prism.Forms\PrismApplicationBase.cs:84
at Prism.PrismApplicationBase..ctor (Prism.IPlatformInitializer platformInitializer, System.Boolean setFormsDependencyResolver) [0x00038] in d:\a\1\s\Source\Xamarin\Prism.Forms\PrismApplicationBase.cs:75
at Prism.PrismApplicationBase..ctor (Prism.IPlatformInitializer platformInitializer) [0x00000] in d:\a\1\s\Source\Xamarin\Prism.Forms\PrismApplicationBase.cs:57
at Prism.Autofac.PrismApplication..ctor (Prism.IPlatformInitializer platformInitializer) [0x00000] in D:\a\1\s\Source\Xamarin\Prism.Autofac.Forms\PrismApplication.cs:30
at DisMobi.App..ctor (Prism.IPlatformInitializer initializer) [0x00000] in C:...........\App.xaml.cs:28
at xxxxxx.Droid.MainActivity.OnCreate (Android.OS.Bundle bundle) [0x00079] in C:..........\xxxxxx.Android\MainActivity.cs:35
at Android.App.Activity.n_OnCreate_Landroid_os_Bundle_ (System.IntPtr jnienv, System.IntPtr native__this, System.IntPtr native_savedInstanceState) [0x00011] in :0
at (wrapper dynamic-method) Android.Runtime.DynamicMethodNameCounter.3(intptr,intptr,intptr)
I am sometimes getting the following exception:
Unhandled Exception: Android.Runtime.JavaProxyThrowable: Exception of type 'Android.Runtime.JavaProxyThrowable' was thrown.
--- End of managed Android.Runtime.JavaProxyThrowable stack trace ---
android.runtime.JavaProxyThrowable: System.NotSupportedException: Unable to activate instance of type TaxiTabletUniversal.Droid.Views.SoftMeterView from native handle 0xbe8cfb2c (key_handle 0x369e8281). ---> System.MissingMethodException: No constructor found for TaxiTabletUniversal.Droid.Views.SoftMeterView::.ctor(System.IntPtr, Android.Runtime.JniHandleOwnership) ---> Java.Interop.JavaLocationException: Exception of type 'Java.Interop.JavaLocationException' was thrown.
--- End of inner exception stack trace ---
at Java.Interop.TypeManager.CreateProxy (System.Type type, System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer) [0x00054] in <5ade030ddd6b4e4c9dda56516f1de4fe>:0
at Java.Interop.TypeManager.CreateInstance (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer, System.Type targetType) [0x00111] in <5ade030ddd6b4e4c9dda56516f1de4fe>:0
--- End of inner exception stack trace ---
at Java.Interop.TypeManager.CreateInstance (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer, System.Type targetType) [0x0017d] in <5ade030ddd6b4e4c9dda56516f1de4fe>:0
at Java.Lang.Object.GetObject (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer, System.Type type) [0x000b9] in <5ade030ddd6b4e4c9dda56516f1de4fe>:0
at Java.Lang.Object._GetObject[T] (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer) [0x00017] in <5ade030ddd6b4e4c9dda56516f1de4fe>:0
at Java.Lang.Object.GetObject[T] (System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer) [0x00000] in <5ade030ddd6b4e4c9dda56516f1de4fe>:0
at Java.Lang.Object.GetObject[T] (System.IntPtr jnienv, System.IntPtr handle, Android.Runtime.JniHandleOwnership transfer) [0x00006] in <5ade030ddd6b4e4c9dda56516f1de4fe>:0
at Android.Views.ViewTreeObserver+IOnGlobalLayoutListenerInvoker.n_OnGlobalLayout (System.IntPtr jnienv, System.IntPtr native__this) [0x00000] in <5ade030ddd6b4e4c9dda56516f1de4fe>:0
at (wrapper dynamic-method) System.Object.90422e09-526e-4347-b02e-8c2980bde53e(intptr,intptr)
at mvvmcross.droid.views.MvxActivity.n_onGlobalLayout(Native Method)
at mvvmcross.droid.views.MvxActivity.onGlobalLayout(MvxActivity.java:84)
at android.view.ViewTreeObserver.dispatchOnGlobalLayout(ViewTreeObserver.java:986)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2221)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1306)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7031)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:821)
at android.view.Choreographer.doCallbacks(Choreographer.java:606)
at android.view.Choreographer.doFrame(Choreographer.java:576)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:807)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:145)
at android.app.ActivityThread.main(ActivityThread.java:6914)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199)
with the bit that stands out from that exception saying :
No constructor found for TaxiTabletUniversal.Droid.Views.SoftMeterView::.ctor(System.IntPtr, Android.Runtime.JniHandleOwnership)
But the class SoftmeterView (derived from MvxActivity) does have 2 constructors:
public SoftMeterView() : base()
{
MoveTaskToBack(true);
IsCreated = true;
}
with the second one matching the exact signature the exception is complaining about:
public SoftMeterView(IntPtr javaReference, JniHandleOwnership transfer) : base(javaReference, transfer)
{
MoveTaskToBack(true);
IsCreated = true;
}
any thoughts ?
I am trying to implement Overlay view from the Link. In android it is working fine but showing System.MissingMethodException on UIApplication.Main(args, null, "AppDelegate");
Upadated
System.MissingMethodException: Default constructor not found for type VenkysHRMS.iOS.ShowOverlay
at System.RuntimeType.CreateInstanceMono (System.Boolean nonPublic) [0x00066] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.9.1.24/src/Xamarin.iOS/mcs/class/corlib/ReferenceSources/RuntimeType.cs:171
at System.RuntimeType.CreateInstanceSlow (System.Boolean publicOnly, System.Boolean skipCheckThis, System.Boolean fillCache, System.Threading.StackCrawlMark& stackMark) [0x00009] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.9.1.24/src/Xamarin.iOS/mcs/class/corlib/ReferenceSources/RuntimeType.cs:153
at System.RuntimeType.CreateInstanceDefaultCtor (System.Boolean publicOnly, System.Boolean skipCheckThis, System.Boolean fillCache, System.Threading.StackCrawlMark& stackMark) [0x00027] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.9.1.24/src/Xamarin.iOS/mcs/class/referencesource/mscorlib/system/rttype.cs:5639
at System.Activator.CreateInstance (System.Type type, System.Boolean nonPublic) [0x00039] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.9.1.24/src/Xamarin.iOS/mcs/class/referencesource/mscorlib/system/activator.cs:201
at System.Activator.CreateInstance (System.Type type) [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.9.1.24/src/Xamarin.iOS/mcs/class/referencesource/mscorlib/system/activator.cs:134
at Xamarin.Forms.DependencyService.Get[T] (Xamarin.Forms.DependencyFetchTarget fetchTarget) [0x00065] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Core\DependencyService.cs:35
at VenkysHRMS.View.Login+<OnCreate>d__2.MoveNext () [0x0001b] in /Users/mac/Desktop/VenkysHRMS/VenkysHRMS/VenkysHRMS/View/Login.xaml.cs:33
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.9.1.24/src/Xamarin.iOS/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:152
at System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__6_0 (System.Object state) [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.9.1.24/src/Xamarin.iOS/mcs/class/referencesource/mscorlib/system/runtime/compilerservices/AsyncMethodBuilder.cs:1018
at UIKit.UIKitSynchronizationContext+<Post>c__AnonStorey0.<>m__0 () [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.9.1.24/src/Xamarin.iOS/UIKit/UIKitSynchronizationContext.cs:24
at Foundation.NSAsyncActionDispatcher.Apply () [0x00000] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.9.1.24/src/Xamarin.iOS/Foundation/NSAction.cs:163
at at (wrapper managed-to-native) UIKit.UIApplication.UIApplicationMain(int,string[],intptr,intptr)
at UIKit.UIApplication.Main (System.String[] args, System.IntPtr principal, System.IntPtr delegate) [0x00005] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.9.1.24/src/Xamarin.iOS/UIKit/UIApplication.cs:79
at UIKit.UIApplication.Main (System.String[] args, System.String principalClassName, System.String delegateClassName) [0x00038] in /Library/Frameworks/Xamarin.iOS.framework/Versions/11.9.1.24/src/Xamarin.iOS/UIKit/UIApplication.cs:63
at VenkysHRMS.iOS.Application.Main (System.String[] args) [0x00001] in /Users/mac/Desktop/VenkysHRMS/VenkysHRMS/VenkysHRMS.iOS/Main.cs:17
I am getting the following in the Play console. I don't know what JavaProxyThrowable means. How can I find out what the error means and fix it?
android.runtime.JavaProxyThrowable:
at DiabeticNow.MainActivity+<>c__DisplayClass3_0.<OnCreate>b__1 (System.Object <p0>, System.EventArgs <p1>) [0x01744] in <dabfa6ee96644f0a980241e8b5bd1c61>:0
at Android.Views.View+IOnClickListenerImplementor.OnClick (Android.Views.View v) [0x00011] in <794f2773dcf94ef592cfddeec7272681>:0
at Android.Views.View+IOnClickListenerInvoker.n_OnClick_Landroid_view_View_ (System.IntPtr jnienv, System.IntPtr native__this, System.IntPtr native_v) [0x0000f] in <794f2773dcf94ef592cfddeec7272681>:0
at (wrapper dynamic-method) System.Object:04a4eea7-8182-4d20-9207-17bd8bcbd598 (intptr,intptr,intptr)
at mono.android.view.View_OnClickListenerImplementor.n_onClick (Native Method)
at mono.android.view.View_OnClickListenerImplementor.onClick (View_OnClickListenerImplementor.java:30)
at android.view.View.performClick (View.java:6261)
at android.widget.TextView.performClick (TextView.java:11159)
at android.view.View$PerformClick.run (View.java:23748)
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:6776)
at java.lang.reflect.Method.invoke (Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:1496)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1386)
It looks like this is a method that Xamarin uses to turn C# exceptions into Java exceptions. There seems to be details of where the problem might be in your C# code:
DiabeticNow.MainActivity+<>c__DisplayClass3_0.b__1 (System.Object , System.EventArgs ) [0x01744] in :0
at Android.Views.View+IOnClickListenerImplementor.OnClick (Android.Views.View v) [0x00011] in <794f2773dcf94ef592cfddeec7272681>:0
at Android.Views.View+IOnClickListenerInvoker.n_OnClick_Landroid_view_View_ (System.IntPtr jnienv, System.IntPtr native__this, System.IntPtr native_v) [0x0000f] in ...
If you posted the relevant c# code and tagged with C# someone might be able to help.
I am currently developing a Xamarin app and all of a sudden my Android app started crashing on LoginActivity. I have researched a lot on "
Java.Lang.ClassNotFoundException: Didn't find class
"android.support.v7.appcompat.R$styleable" on path
"
Tried things like updating Android SDK, deleting bin and obj folder. Looking at stacktrace it seems to be an issue with MvvmCross. Currently I am using 3.5.1 of MvvmCross.
Another fact is that I am the only one in team who is facing this issue.
[MonoDroid] UNHANDLED EXCEPTION:
[MonoDroid] Java.Lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v7/appcompat/R$styleable; ---> Java.Lang.ClassNotFoundException: Didn't find class "android.support.v7.appcompat.R$styleable" on path: DexPathList[[zip file "/data/app/org.cancer.fundraising-1/base.apk"],nativeLibraryDirectories=[/data/app/org.cancer.fundraising-1/lib/x86, /vendor/lib, /system/lib]]
[MonoDroid] --- End of managed exception stack trace ---
[MonoDroid] java.lang.ClassNotFoundException: Didn't find class "android.support.v7.appcompat.R$styleable" on path: DexPathList[[zip file "/data/app/org.cancer.fundraising-1/base.apk"],nativeLibraryDirectories=[/data/app/org.cancer.fundraising-1/lib/x86, /vendor/lib, /system/lib]]
[MonoDroid] at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
[MonoDroid] at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
[MonoDroid] at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
[MonoDroid] at android.support.v7.app.AppCompatDelegateImplBase.onCreate(AppCompatDelegateImplBase.java:118)
[MonoDroid] at android.support.v7.app.AppCompatDelegateImplV7.onCreate(AppCompatDelegateImplV7.java:146)
[MonoDroid] at android.support.v7.app.AppCompatActivity.onCreate(AppCompatActivity.java:59)
[MonoDroid] at md5da1044ae077a2d5a79e87e5c6bedf113.LoginActivity.n_onCreate(Native Method)
[MonoDroid] at md5da1044ae077a2d5a79e87e5c6bedf113.LoginActivity.onCreate(LoginActivity.java:31)
[MonoDroid] at android.app.Activity.performCreate(Activity.java:5990)
[MonoDroid] at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106)
[MonoDroid] at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2278)
[MonoDroid] at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387)
[MonoDroid] at android.app.ActivityThread.access$800(ActivityThread.java:151)
[MonoDroid] at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303)
[MonoDroid] at android.os.Handler.dispatchMessage(Handler.java:102)
[MonoDroid] at android.os.Looper.loop(Looper.java:135)
[MonoDroid] at android.app.ActivityThread.main(ActivityThread.java:5254)
[MonoDroid] at java.lang.reflect.Method.invoke(Native Method)
[MonoDroid] at java.lang.reflect.Method.invoke(Method.java:372)
[MonoDroid] at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
[MonoDroid] at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
[MonoDroid] Suppressed: java.lang.ClassNotFoundException: android.support.v7.appcompat.R$styleable
[MonoDroid] at java.lang.Class.classForName(Native Method)
[MonoDroid] at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
[MonoDroid] at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
[MonoDroid] at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
[MonoDroid] ... 19 more
[MonoDroid] Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available
[MonoDroid] --- End of inner exception stack trace ---
[MonoDroid] at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () <0xa047bf80 + 0x0002b> in <filename unknown>:0
[MonoDroid] at Android.Runtime.JNIEnv.CallNonvirtualVoidMethod (IntPtr jobject, IntPtr jclass, IntPtr jmethod, Android.Runtime.JValue* parms) <0xa2007008 + 0x000b3> in <filename unknown>:0
[MonoDroid] at Android.App.Activity.OnCreate (Android.OS.Bundle savedInstanceState) <0xa1018918 + 0x0014f> in <filename unknown>:0
[MonoDroid] at ACS.FundRaising.Android.MvxActionBarEventSourceActivity.OnCreate (Android.OS.Bundle bundle) <0xa047b4e0 + 0x00037> in <filename unknown>:0
[MonoDroid] at ACS.FundRaising.Android.LoginActivity.OnCreate (Android.OS.Bundle bundle) <0xa047b278 + 0x0001b> in <filename unknown>:0
[MonoDroid] at Android.App.Activity.n_OnCreate_Landroid_os_Bundle_ (IntPtr jnienv, IntPtr native__this, IntPtr native_savedInstanceState) <0xa116f9b0 + 0x00057> in <filename unknown>:0
[MonoDroid] at (wrapper dynamic-method) System.Object:dd5e6f9d-f207-497c-b5c3-0a2c9dac76e7 (intptr,intptr,intptr)
[MonoDroid] --- End of managed exception stack trace ---
[MonoDroid] java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v7/appcompat/R$styleable;
[MonoDroid] at android.support.v7.app.AppCompatDelegateImplBase.onCreate(AppCompatDelegateImplBase.java:118)
[MonoDroid] at android.support.v7.app.AppCompatDelegateImplV7.onCreate(AppCompatDelegateImplV7.java:146)
[MonoDroid] at android.support.v7.app.AppCompatActivity.onCreate(AppCompatActivity.java:59)
[MonoDroid] at md5da1044ae077a2d5a79e87e5c6bedf113.LoginActivity.n_onCreate(Native Method)
[MonoDroid] at md5da1044ae077a2d5a79e87e5c6bedf113.LoginActivity.onCreate(LoginActivity.java:31)
[MonoDroid] at android.app.Activity.performCreate(Activity.java:5990)
[MonoDroid] at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106)
[MonoDroid] at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2278)
[MonoDroid] at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387)
[MonoDroid] at android.app.ActivityThread.access$800(ActivityThread.java:151)
[MonoDroid] at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303)
[MonoDroid] at android.os.Handler.dispatchMessage(Handler.java:102)
[MonoDroid] at android.os.Looper.loop(Looper.java:135)
[MonoDroid] at android.app.ActivityThread.main(ActivityThread.java:5254)
[MonoDroid] at java.lang.reflect.Method.invoke(Native Method)
[MonoDroid] at java.lang.reflect.Method.invoke(Method.java:372)
[MonoDroid] at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
[MonoDroid] at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
[MonoDroid] Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.v7.appcompat.R$styleable" on path: DexPathList[[zip file "/data/app/org.cancer.fundraising-1/base.apk"],nativeLibraryDirectories=[/data/app/org.cancer.fundraising-1/lib/x86, /vendor/lib, /system/lib]]
[MonoDroid] at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
[MonoDroid] at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
[MonoDroid] at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
[MonoDroid] ... 18 more
[MonoDroid] Suppressed: java.lang.ClassNotFoundException: android.support.v7.appcompat.R$styleable
[MonoDroid] at java.lang.Class.classForName(Native Method)
[MonoDroid] at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
[MonoDroid] at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
[MonoDroid] at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
[MonoDroid] ... 19 more
[MonoDroid] Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available
[Mono] Assembly Ref addref GoogleAnalytics.Core[0xb429abe0] -> System.Net.Http[0xaed233a0]: 3
[Mono] Assembly Ref addref GoogleAnalytics.Core[0xb429abe0] -> System.Core[0xb4387580]: 7
[Mono] Assembly Ref addref System.Net.Http[0xaed233a0] -> System[0xb4387760]: 10
[Mono] Assembly Ref addref System.Net.Http[0xaed233a0] -> System.Core[0xb4387580]: 8
[mono-rt] [ERROR] FATAL UNHANDLED EXCEPTION: Java.Lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v7/appcompat/R$styleable; ---> Java.Lang.ClassNotFoundException: Didn't find class "android.support.v7.appcompat.R$styleable" on path: DexPathList[[zip file "/data/app/org.cancer.fundraising-1/base.apk"],nativeLibraryDirectories=[/data/app/org.cancer.fundraising-1/lib/x86, /vendor/lib, /system/lib]]
[mono-rt]
[mono-rt] --- End of managed exception stack trace ---
[mono-rt] java.lang.ClassNotFoundException: Didn't find class "android.support.v7.appcompat.R$styleable" on path: DexPathList[[zip file "/data/app/org.cancer.fundraising-1/base.apk"],nativeLibraryDirectories=[/data/app/org.cancer.fundraising-1/lib/x86, /vendor/lib, /system/lib]]
[mono-rt] at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
[mono-rt] at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
[mono-rt] at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
[mono-rt] at android.support.v7.app.AppCompatDelegateImplBase.onCreate(AppCompatDelegateImplBase.java:118)
[mono-rt] at android.support.v7.app.AppCompatDelegateImplV7.onCreate(AppCompatDelegateImplV7.java:146)
[mono-rt] at android.support.v7.app.AppCompatActivity.onCreate(AppCompatActivity.java:59)
[mono-rt] at md5da1044ae077a2d5a79e87e5c6bedf113.LoginActivity.n_onCreate(Native Method)
[mono-rt] at md5da1044ae077a2d5a79e87e5c6bedf113.LoginActivity.onCreate(LoginActivity.java:31)
[mono-rt] at android.app.Activity.performCreate(Activity.java:5990)
[mono-rt] at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106)
[mono-rt] at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2278)
[mono-rt] at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2387)
[mono-rt] at android.app.ActivityThread.access$800(ActivityThread.java:151)
[mono-rt] at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1303)
[mono-rt] at android.os.Handler.dispatchMessage(Handler.java:102)
[mono-rt] at android.os.Looper.loop(Looper.java:135)
[mono-rt] at android.app.ActivityThread.main(ActivityThread.java:5254)
[mono-rt] at java.lang.reflect.Method.invoke(Native Method)
[mono-rt] at java.lang.reflect.Method.invoke(Method.java:372)
[mono-rt] at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
[mono-rt] at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)
[mono-rt] Suppressed: java.lang.ClassNotFoundException: android.support.v7.appcompat.R$styleable
[mono-rt] at java.lang.Class.classForName(Native Method)
[mono-rt] at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
[mono-rt] at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
[mono-rt] at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
[mono-rt] ... 19 more
[mono-rt] Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available
[mono-rt]
[mono-rt] --- End of inner exception stack trace ---
[mono-rt] at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () <0xa047bf80 + 0x0002b> in <filename unknown>:0
[mono-rt] at Android.Runtime.JNIEnv.CallNonvirtualVoidMethod (IntPtr jobject, IntPtr jclass, IntPtr jmethod, Android.Runtime.JValue* parms) <0xa2007008 + 0x000b3> in <filename unknown>:0
[mono-rt] at Android.App.Activity.OnCreate (Android.OS.Bundle savedInstanceState) <0xa1018918 + 0x0014f> in <filename unknown>:0
[mono-rt] at ACS.FundRaising.Android.MvxActionBarEventSourceActivity.OnCreate (Android.OS.Bundle bundle) <0xa047b4e0 + 0x00037> in <filename unknown>:0
[mono-rt] at ACS.FundRaising.Android.LoginActivity.OnCreate (Android.OS.Bundle bundle) <0xa047b278 + 0x0001b> in <filename unknown>:0
[mono-rt] at Android.App.Activity.n_OnCreate_Landroid_os_Bundle_ (IntPtr jnienv, IntPtr native__this, IntPtr native_savedInstanceState) <0xa116f9b0 + 0x00057> in <filename unknown>:0
[mono-rt] at (wrapper dynamic-method) System.Object:dd5e6f9d-f207-497c-b5c3-0a2c9dac76e7 (intptr,intptr,intptr)
[mono-rt] --- End of managed exception stack trace ---
[mono-rt] java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v7/appcompat/R$styleable;
[mono-rt] at android.support.v7.app.AppCompatDelegateImplBase.onCreate(AppCompatDelegateImplBase.java:118)
[mono-rt] at android.support.v7.app.AppCompatDelegateImplV7.onCreate(AppCompatDelegateImplV7.java:146)
[mono-rt] at android.support.v7.app.AppCompatActivity.onCreate(AppCompa
In my case a solution Clean was necessary to get it working.
This issue is resolved by Re-Cloning the repository. Still I don't know what caused the issue but I ended up wasting lot of time. I tried things like;
Removing and downloading packages
Deleting Obj/Bin
Deleting appcompat from android SDK install folder and re-downloading it
Using component instead of package
Probably build output generated some garbage resulting in such issue.