0

I want run my app in android api 19 and above but between 19 and 23 my app crashed when i clicked a button and unfortunately logcat show me unknown source (i mention that). what is the problem or how can i see where is the problem.

in android api 23 and above my app work correctly and error appears when i clicked button and try caught is not work ...

Process: com.daryani.example, PID: 4786
java.lang.NullPointerException
    at b.c.a.a.d.b.b.a()
    at com.daryani.example.activity.r.a(:112)
    at f.n.run(:71)
    at android.os.Handler.handleCallback(Handler.java:733)
    at android.os.Handler.dispatchMessage(Handler.java:95)
    at android.os.Looper.loop(Looper.java:136)
    at android.app.ActivityThread.main(ActivityThread.java:5017)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:515)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
    at dalvik.system.NativeStart.main(Native Method)
alireza daryani
  • 787
  • 5
  • 16
  • 1
    Why is your code obfuscated? Is this a stacktrace from a release build? The solution for a `NullPointerException` is the same, however, it's just harder to debug: https://stackoverflow.com/questions/218384/what-is-a-nullpointerexception-and-how-do-i-fix-it – PPartisan Jul 13 '19 at 11:20
  • its not my code,its a logcat error messages.i mention that the code work correctly in other api s – alireza daryani Jul 13 '19 at 11:22

3 Answers3

0

The error is a null pointer exception, meaning a variable you pass is not defined. The error is there, can you please elaborate what you mean by how to get the solution. The logcat even tells you that it is in "com.daryani.example.activity.r.a" line 112. By the way what android studio version are you using? Also, check if you have the support libraries in your project:

See this http://developer.android.com/intl/es/tools/support-library/index.html).

Also, please post your code so we can help you more.

Probable Error: Some of your code or your design(xml) is only for API +21-22 and not for API 19. That could be the error, but again post the programming you have done, so we can help you.

Edit: Firebase Crashlytics is an amazing solution, but not for small application when you just want to identify a small bug. Can be useful when publishing your app and later checking it, though, the logcat problem is still not solved.

0

You can use android studio's specific methods to write outputs into logCat and check if your codes are working well or not. These methods are described in pages below, as well:

How do I write outputs to the Log in Android?

https://developer.android.com/reference/android/util/Log.html?hl=fr

elyar abad
  • 771
  • 1
  • 8
  • 27
0

I install fabric crashlitycs in my app and there is show that where is the error with class and lines. So i solved the problem when i understand what is this.

alireza daryani
  • 787
  • 5
  • 16