1

I've got some problems, only one for now.

I deploy my application to Google Play about 2 months ago, and yesterday I received an email relating the app does not open in a device and it break before open, showing on the screen "Unfortunately, (?) Has stopped". It runs normaly in another device, but not in the "J3 (2016) android version 5.11's user".

I opened the Google Play Console, and looked for answers in ANR's menu. I found this:

**java.lang.NoSuchMethodError:**
at md5846bd09d5a4e74db0c2de01aa9d1e1cf.MainActivity.n_onCreate (Native Method)
at md5846bd09d5a4e74db0c2de01aa9d1e1cf.MainActivity.onCreate (MainActivity.java:30)
at android.app.Activity.performCreate (Activity.java:6609)
at android.app.Instrumentation.callActivityOnCreate (Instrumentation.java:1134)
at android.app.ActivityThread.performLaunchActivity (ActivityThread.java:3113)
at android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:3275)
at android.app.ActivityThread.access$1000 (ActivityThread.java:218)
at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1744)
at android.os.Handler.dispatchMessage (Handler.java:102)
at android.os.Looper.loop (Looper.java:145)
at android.app.ActivityThread.main (ActivityThread.java:7007)
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)

I'll try to reproduce this error via android emulator. Does anybody seen this before, know how to solve and can help me?

Thank you guys.

2 Answers2

0

It looks like you are doing something in the native code of your app which is not supported on Android 5. From the comments it appears you can reproduce this in an emulator. So the next step to find out what is breaking is to look at your native code, or even use native code debugging in your emulator to find out whatr it failing.

There are some docs on native code debugging in Androud Studio here.

Nick Fortescue
  • 13,530
  • 1
  • 31
  • 37
  • I developed this application in Xamarin, on Visual Studio. With Android Studio debugger, can I debug the application that runs in my emulator? It is correct? Looks a little confuse. How can I do it? – Gustavo Brandão Mar 27 '19 at 19:26
  • Sorry, I don't know much about Xamarin. Microsoft appear to have some docs here: https://learn.microsoft.com/en-us/xamarin/android/deploy-test/debugging/debug-on-emulator?tabs=windows but I've never tried it – Nick Fortescue Mar 28 '19 at 09:49
  • Don't be sorry, its OK. Thank you for your help. I read some lines from this docs, but in Xamarin it is only possible to debug C#, not Native. By the way, I noticed that this application only runs from 6.0 to up, so I'll change my Android Manifest's Minimum Version to 6.0. – Gustavo Brandão Mar 29 '19 at 12:02
0

I found where the error occours, thank God! After a long code analysis day, I found my error, and it is related with permission request, and works like that:

-From Android 6.0 to up, the applications need to ask permission to use some functionalities from the device (I did this structure). But what happens is that, below to 6.0, needn't to request permission, and then I had a conflict.

So, I did a conditional structure to verify the device's Android Version, and depending of its version, will or not request permissions.