Xamarin / Android - java.lang.reflect.InvocationTargetException

I am getting this stack in google play console (new vitality section) for many devices (224 occurrences appear), but I really don't understand how I can find the root cause of this error:

java.lang.RuntimeException: 
  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:679)
Caused by: java.lang.reflect.InvocationTargetException: 
  at java.lang.reflect.Method.invoke(Native Method:0)
  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)

      

Has anyone ever had this? How can I find the root cause?

thank

+3


source to share


2 answers


I can't tell you what the problem is with your application, but I can shed some light on why you are getting such an opaque glassy structure.

In mid-May 2017, Google changed the way it collects crash data. Previously, the only way to collect crash data was to report each individual crash. After an app crashes, users will be prompted to "Report" crashes the next time they open the app.

Users can now automatically submit crash data automatically, without having to intentionally report every single crash (although the old system is still in place).

For some reason, there was a crash in the Xamarin for Android posts on the new system, most of the stack trace was previously available in the old model. The main reason has to do with how the exceptions thrown from the Zygote Android part are specialized instances of classes java.lang.Error

and java.lang.Exception

that somehow don't inherit from java.lang.Throwable

, which is what Xamarin.



There is a long and detailed discussion on the Xamarin bugzilla system here, https://bugzilla.xamarin.com/show_bug.cgi?id=56653 . The key point says:

It currently looks like Zygote and company are special wrappers for java.lang.Exception and java.lang.Error. JavaProxyThrowable instead inherits from java.lang.Throwable - the base Error and Exception class - and Zygote / etc. don't seem to support this.

In any case, the Xamarin developers have changed their systems and we just have to wait until a new version is released.

In the meantime, you need to look to other crash reporting systems like HockeyApp or Crashlytics to find out what is causing your specific problem.

+1


source


This seems to be a problem with Xamarin itself.



I think it's better to switch to the official android studio because these types of hacked development solutions like Xamarin are not guaranteed to work correctly in all situations.

-3


source







All Articles