Runtime Error
java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=3, result=-1, data=Intent { dat=content://media/external/images/media/2008952 flg=0x1 (has extras) }} to activity {edu.mit.appinventor.aicompanion3/edu.mit.appinventor.aicompanion3.Screen1}: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.io.File.delete()' on a null object reference at android.app.ActivityThread.deliverResults(ActivityThread.java:4662) at android.app.ActivityThread.handleSendResult(ActivityThread.java:4704) at android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:49) at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:113) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:71) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2036) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:224) at android.app.ActivityThread.main(ActivityThread.java:7081) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:604) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:928) Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.io.File.delete()' on a null object reference at com.google.appinventor.components.runtime.ImagePicker.copyToExternalStorageAndDeleteSource(ImagePicker.java:207) at com.google.appinventor.components.runtime.ImagePicker.saveSelectedImageToExternalStorage(ImagePicker.java:175) at com.google.appinventor.components.runtime.ImagePicker.resultReturned(ImagePicker.java:149) at com.google.appinventor.components.runtime.Form.onActivityResult(Form.java:605) at android.app.Activity.dispatchActivityResult(Activity.java:7588) at android.app.ActivityThread.deliverResults(ActivityThread.java:4655) ... 11 more
Note: You will not see another error reported for 5 seconds.
Dismiss