0

I'm receiving crash reports in Google Play Console for my app, and the stacktrace is as follows:

java.lang.UnsatisfiedLinkError: 
  at mono.android.Runtime.register (Native Method)
  at md5f3dc63ecaad575af71bd7a9b1622f75b.n.<clinit> (n.java:20)
  at java.lang.Class.newInstance (Native Method)
  at android.app.ActivityThread.handleCreateBackupAgent (ActivityThread.java:3431)
  at android.app.ActivityThread.-wrap3 (Unknown Source)
  at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1813)
  at android.os.Handler.dispatchMessage (Handler.java:105)
  at android.os.Looper.loop (Looper.java:180)
  at android.app.ActivityThread.main (ActivityThread.java:6944)
  at java.lang.reflect.Method.invoke (Native Method)
  at com.android.internal.os.Zygote$MethodAndArgsCaller.run (Zygote.java:240)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:835)

I'm using Xamarin.Android with Visual Studio for my development, and the app is targeting for Android Pie (API 28). The crash only happens for Android 8.0 and 8.1 devices (which are capable of arm64-v8a, not sure it's just a coincidence, most devices running Oreo are running in 64-bit anyways).

The class n in the stacktrace is my implementation of BackupAgent. This happens once everyday or every 2 days, and it seems (not 100% sure yet) that Auto Backup is still running without problem with the error.

The problem has been around for almost a month, and I tried a couple of things but they don't seem to make any difference:

  1. Releasing with and without arm64-v8a
    • This eliminates the cause from mono library for 64-bit support
  2. Releasing with and without obfuscation
    • I'm using Dotfuscator Community Edition
    • Same crash reports but just the class name is revealed
  3. Installing the app through Play Store and locally with signed APK
    • This suggests that there is nothing to do with the installation method

I also tried to remove my custom BackupAgent class and make use of the default BackupAgent, the problem was gone. I need to add extra logic in my BackupAgent though, so this is a no-go for me.

Anyone having a similar problem? It would be nice if I could be guided with some clues to the problem. Thanks.

Elvison
  • 163
  • 1
  • 8
  • On going issue: https://github.com/xamarin/xamarin-android/search?q=java.lang.UnsatisfiedLinkError&type=Issues – SushiHangover Dec 12 '18 at 06:24
  • @SushiHangover My issue is slightly different from that one, but I commented on the thread with my situation. Thanks. – Elvison Dec 12 '18 at 11:03
  • Interesting findings: I updated my app with arm64-v8a support, and the problem is still there after I updated the app in my testing Oreo devices. However, the problem apparently goes away after I uninstalled it and did a fresh installation. I had 4 Oreo testing devices, and I did that in 2 of them only, so it's a controlled result. – Elvison Dec 18 '18 at 14:16

0 Answers0