mPhoto.setImageBitmap(mPhotoImage);
mPhoto.setImageBitmap(mPhotoImage);出问题,在图库选择图片后程序崩溃
Caused by: java.lang.NullPointerException
mPhoto.setImageBitmap(mPhotoImage);出问题,在图库选择图片后程序崩溃
Caused by: java.lang.NullPointerException
2015-05-25
05-25 20:51:09.161: E/Parcel(29623): Reading a NULL string not supported here.
05-25 20:51:09.161: E/Parcel(29623): Reading a NULL string not supported here.
05-25 20:51:09.161: E/Parcel(29623): Reading a NULL string not supported here.
05-25 20:51:09.171: E/Parcel(29623): Reading a NULL string not supported here.
05-25 20:51:09.171: E/Parcel(29623): Reading a NULL string not supported here.
05-25 20:51:09.171: E/Parcel(29623): Reading a NULL string not supported here.
05-25 20:51:09.191: E/Parcel(29623): Reading a NULL string not supported here.
05-25 20:51:09.201: E/Parcel(29623): Reading a NULL string not supported here.
05-25 20:51:09.201: E/Parcel(29623): Reading a NULL string not supported here.
05-25 20:51:09.221: E/Parcel(29623): Reading a NULL string not supported here.
05-25 20:51:09.221: E/Parcel(29623): Reading a NULL string not supported here.
05-25 20:51:09.231: D/LauncherGraphicJni(29623): nativeInit:
05-25 20:51:09.231: D/LauncherGraphicJni(29623): setCutAndScalePram iconSize = 180, densityRatio = 1.000000, gDstIconSize = 172
05-25 20:51:09.271: D/LauncherGraphicJni(29623): Detect_Icon_Boder test leftTransparentPos = 18
05-25 20:51:09.271: D/LauncherGraphicJni(29623): Detect_Icon_Boder test topTransparentPos = 10
05-25 20:51:09.271: D/LauncherGraphicJni(29623): Detect_Icon_Boder test rightTransparentPos = 19
05-25 20:51:09.271: D/LauncherGraphicJni(29623): Detect_Icon_Boder test bottomTransparentPos = 10
05-25 20:51:09.271: D/LauncherGraphicJni(29623): scaleAndMaskBitmap test needCut = 0, isSquare =
05-25 20:51:09.271: D/LauncherGraphicJni(29623): Graphic_Mask_Bitmap_Utilites_scaleAndMaskBitmap gmaskbitmap : exactWidth is 172, exactHeight is 172
05-25 20:51:09.271: D/LauncherGraphicJni(29623): endddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd
05-25 20:51:09.311: E/Parcel(29623): Reading a NULL string not supported here.
05-25 20:51:09.321: E/Parcel(29623): Reading a NULL string not supported here.
05-25 20:51:09.391: D/libEGL(29623): loaded /vendor/lib/egl/libEGL_adreno.so
05-25 20:51:09.391: D/libEGL(29623): loaded /vendor/lib/egl/libGLESv1_CM_adreno.so
05-25 20:51:09.391: D/libEGL(29623): loaded /vendor/lib/egl/libGLESv2_adreno.so
05-25 20:51:09.391: I/Adreno-EGL(29623): <qeglDrvAPI_eglInitialize:381>: EGL 1.4 QUALCOMM build: ()
05-25 20:51:09.391: I/Adreno-EGL(29623): OpenGL ES Shader Compiler Version: 20.00.05
05-25 20:51:09.391: I/Adreno-EGL(29623): Build Date: 05/28/14 Wed
05-25 20:51:09.391: I/Adreno-EGL(29623): Local Branch:
05-25 20:51:09.391: I/Adreno-EGL(29623): Remote Branch:
05-25 20:51:09.391: I/Adreno-EGL(29623): Local Patches:
05-25 20:51:09.391: I/Adreno-EGL(29623): Reconstruct Branch:
05-25 20:51:09.421: D/OpenGLRenderer(29623): Enabling debug mode 0
05-25 20:51:09.441: E/Parcel(29623): Reading a NULL string not supported here.
05-25 20:51:34.891: E/Parcel(29623): Reading a NULL string not supported here.
05-25 20:51:38.591: D/AndroidRuntime(29623): Shutting down VM
05-25 20:51:38.591: W/dalvikvm(29623): threadid=1: thread exiting with uncaught exception (group=0x41676898)
05-25 20:51:38.591: E/AndroidRuntime(29623): FATAL EXCEPTION: main
05-25 20:51:38.591: E/AndroidRuntime(29623): java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=272, result=-1, data=Intent { dat=content://media/external/images/media/122081 }} to activity {com.example.hodt/com.example.hodt.MainActivity}: java.lang.NullPointerException
05-25 20:51:38.591: E/AndroidRuntime(29623): at android.app.ActivityThread.deliverResults(ActivityThread.java:3392)
05-25 20:51:38.591: E/AndroidRuntime(29623): at android.app.ActivityThread.handleSendResult(ActivityThread.java:3435)
05-25 20:51:38.591: E/AndroidRuntime(29623): at android.app.ActivityThread.access$1100(ActivityThread.java:144)
05-25 20:51:38.591: E/AndroidRuntime(29623): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1307)
05-25 20:51:38.591: E/AndroidRuntime(29623): at android.os.Handler.dispatchMessage(Handler.java:99)
05-25 20:51:38.591: E/AndroidRuntime(29623): at android.os.Looper.loop(Looper.java:137)
05-25 20:51:38.591: E/AndroidRuntime(29623): at android.app.ActivityThread.main(ActivityThread.java:5166)
05-25 20:51:38.591: E/AndroidRuntime(29623): at java.lang.reflect.Method.invokeNative(Native Method)
05-25 20:51:38.591: E/AndroidRuntime(29623): at java.lang.reflect.Method.invoke(Method.java:525)
05-25 20:51:38.591: E/AndroidRuntime(29623): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:768)
05-25 20:51:38.591: E/AndroidRuntime(29623): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:584)
05-25 20:51:38.591: E/AndroidRuntime(29623): at dalvik.system.NativeStart.main(Native Method)
05-25 20:51:38.591: E/AndroidRuntime(29623): Caused by: java.lang.NullPointerException
05-25 20:51:38.591: E/AndroidRuntime(29623): at com.example.hodt.MainActivity.onActivityResult(MainActivity.java:83)
05-25 20:51:38.591: E/AndroidRuntime(29623): at android.app.Activity.dispatchActivityResult(Activity.java:5382)
05-25 20:51:38.591: E/AndroidRuntime(29623): at android.app.ActivityThread.deliverResults(ActivityThread.java:3388)
05-25 20:51:38.591: E/AndroidRuntime(29623): ... 11 more
错误日志,代码没错啊
举报