java.lang.NullPointerException

Attempt to invoke virtual method 'java.lang.String android.net.Uri.getScheme()' on a null object reference

Samebug tips0

We couldn't find tips for this exception.

Don't give up yet. Paste your full stack trace to get a solution.

Solutions on the web58

Stack trace

  • java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.net.Uri.getScheme()' on a null object reference at android.app.ActivityThread.deliverResults(ActivityThread.java:3659) at android.app.ActivityThread.handleSendResult(ActivityThread.java:3702) at android.app.ActivityThread.access$1300(ActivityThread.java:155) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1366) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5343) 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:905) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:700) Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.net.Uri.getScheme()' on a null object reference at android.content.ContentResolver.acquireUnstableProvider(ContentResolver.java:1435) at android.content.ContentResolver.query(ContentResolver.java:462) at android.content.ContentResolver.query(ContentResolver.java:422) at com.app.consumer.fragments.UploadPrescriptionFrag.getRealPathFromURI(UploadPrescriptionFrag.java:251) at com.app.consumer.fragments.UploadPrescriptionFrag.onCaptureImageResult(UploadPrescriptionFrag.java:235) at com.app.consumer.fragments.UploadPrescriptionFrag.onActivityResult(UploadPrescriptionFrag.java:229) at android.support.v4.app.FragmentActivity.onActivityResult(FragmentActivity.java:175) at android.app.Activity.dispatchActivityResult(Activity.java:6218) at android.app.ActivityThread.deliverResults(ActivityThread.java:3655)

Write tip

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

Users with the same issue

Unknown visitor
Unknown visitorOnce,
Unknown UserUnknown User
4 times, last one
filipebatistafilipebatista
2 times, last one
Indri YunitaIndri Yunita
2 times, last one
Stefan BrauneStefan Braune
Once,
1 more bugmates