java.lang.RuntimeException

Failure delivering result ResultInfo{who=null, request=1, result=-1, data=Intent { act=inline-data (has extras) }} to activity {com.example.gentaliu.photoeditor/com.example.gentaliu.photoeditor.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.net.Uri.getScheme()' on a null object reference

Solutions on the web50727

  • Failure delivering result ResultInfo{who=null, request=1, result=-1, data=Intent { act=inline-data (has extras) }} to activity {com.example.gentaliu.photoeditor/com.example.gentaliu.photoeditor.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.net.Uri.getScheme()' on a null object reference
  • Failure delivering result ResultInfo{who=null, request=1, result=-1, data=Intent { act=inline-data (has extras) }} to activity {com.example.gentaliu.photoeditor/com.example.gentaliu.photoeditor.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.net.Uri.getScheme()' on a null object reference
  • via Stack Overflow by Filipe Costa
    , 3 months ago
    Failure delivering result ResultInfo{who=null, request=3, result=-1, data=Intent { act=inline-data (has extras) }} to activity {com.esmad.pdm.friendlymanager/com.esmad.pdm.friendlymanager.UserSettings}: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.net.Uri.getScheme()' on a null object reference
  • Stack trace

    • java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=1, result=-1, data=Intent { act=inline-data (has extras) }} to activity {com.example.gentaliu.photoeditor/com.example.gentaliu.photoeditor.MainActivity}: 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:3840) at android.app.ActivityThread.handleSendResult(ActivityThread.java:3883) at android.app.ActivityThread.access$1700(ActivityThread.java:165) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1426) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5593) 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:960) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755) 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:1477) at android.content.ContentResolver.query(ContentResolver.java:473) at android.content.ContentResolver.query(ContentResolver.java:426) at com.example.gentaliu.photoeditor.MainActivity.getRealPathFromURI(MainActivity.java:189) at com.example.gentaliu.photoeditor.MainActivity.onActivityResult(MainActivity.java:105) at android.app.Activity.dispatchActivityResult(Activity.java:6320) at android.app.ActivityThread.deliverResults(ActivityThread.java:3836)

    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 user
    Once, 1 year ago
    4 times, 6 days ago
    2 times, 3 weeks ago
    2 times, 1 month ago
    Once, 1 year ago
    1 more bugmates