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

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via Stack Overflow by Balaji
, 1 year ago
Attempt to invoke virtual method 'java.lang.String android.net.Uri.getScheme()' on a null object reference
via Stack Overflow by Kamlesh
, 2 years ago
Attempt to invoke virtual method 'java.lang.String inapppurchase.Purchase.getSku()' on a null object reference
via GitHub by msokk
, 1 year ago
Attempt to invoke virtual method 'void org.apache.cordova.CallbackContext.sendPluginResult(org.apache.cordova.PluginResult)' on a null object reference
via google.com by Unknown author, 2 years ago
Attempt to invoke virtual method 'char[] java.lang.String.toCharArray()' on a null object reference
via Google Groups by blitheringeejit, 5 months ago
Attempt to invoke virtual method 'char[] java.lang.String.toCharArray()' on a null object reference
via Stack Overflow by Frank Brenyah
, 2 years ago
Attempt to invoke virtual method 'void java.io.BufferedReader.close()' on a null object reference
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.app.Activity.dispatchActivityResult(Activity.java:6218)
at android.app.ActivityThread.deliverResults(ActivityThread.java:3655)

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 2 years ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.