首页上一页 1 下一页尾页 10 条记录 1/1页
例 16.4 绘制挖取后图片问题
发表在Android图书答疑
2019-07-29
《Android开发详解》第16章 图形图像处理技术 406页-406页
是否精华
是
否
版块置顶:
是
否
按照书上步骤编写完成之后运行程序提示
2019-07-29 19:28:41.548 2218-2245/system_process E/system_server: Invalid ID 0x00000000. 2019-07-29 19:28:41.567 12363-12363/? E/n.app04_drawpi: Unknown bits set in runtime_flags: 0x8000 2019-07-29 19:28:41.590 2394-2394/com.google.android.apps.nexuslauncher E/libprocessgroup: set_timerslack_ns write failed: Operation not permitted 2019-07-29 19:28:41.590 2394-2394/com.google.android.apps.nexuslauncher E/libprocessgroup: set_timerslack_ns write failed: Operation not permitted 2019-07-29 19:28:41.832 1980-2634/? E/SurfaceFlinger: ro.sf.lcd_density must be defined as a build property 2019-07-29 19:28:41.832 1980-2634/? E/SurfaceFlinger: ro.sf.lcd_density must be defined as a build property 2019-07-29 19:28:42.071 12363-12736/com.edesoon.app04_drawpic E/eglCodecCommon: glUtilsParamSize: unknow param 0x000082da 2019-07-29 19:28:42.072 12363-12736/com.edesoon.app04_drawpic E/eglCodecCommon: glUtilsParamSize: unknow param 0x000082da 2019-07-29 19:28:42.092 12363-12363/com.edesoon.app04_drawpic E/BitmapFactory: Unable to decode stream: java.io.FileNotFoundException: /storage/emulated/0/img01.jpg: open failed: ENOENT (No such file or directory) 2019-07-29 19:28:42.093 12363-12363/com.edesoon.app04_drawpic E/AndroidRuntime: FATAL EXCEPTION: main Process: com.edesoon.app04_drawpic, PID: 12363 java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.graphics.Bitmap.isRecycled()' on a null object reference at android.graphics.BaseCanvas.throwIfCannotDraw(BaseCanvas.java:65) at android.graphics.RecordingCanvas.throwIfCannotDraw(RecordingCanvas.java:277) at android.graphics.BaseRecordingCanvas.drawBitmap(BaseRecordingCanvas.java:69) at com.edesoon.app04_drawpic.MainActivity$MyView.onDraw(MainActivity.java:56) at android.view.View.draw(View.java:21423) at android.view.View.updateDisplayListIfDirty(View.java:20300) at android.view.View.draw(View.java:21155) at android.view.ViewGroup.drawChild(ViewGroup.java:4388) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4149) at android.view.View.updateDisplayListIfDirty(View.java:20291) at android.view.View.draw(View.java:21155) at android.view.ViewGroup.drawChild(ViewGroup.java:4388) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4149) at android.view.View.updateDisplayListIfDirty(View.java:20291) at android.view.View.draw(View.java:21155) at android.view.ViewGroup.drawChild(ViewGroup.java:4388) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4149) at android.view.View.updateDisplayListIfDirty(View.java:20291) at android.view.View.draw(View.java:21155) at android.view.ViewGroup.drawChild(ViewGroup.java:4388) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4149) at android.view.View.updateDisplayListIfDirty(View.java:20291) at android.view.View.draw(View.java:21155) at android.view.ViewGroup.drawChild(ViewGroup.java:4388) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4149) at android.view.View.updateDisplayListIfDirty(View.java:20291) at android.view.View.draw(View.java:21155) at android.view.ViewGroup.drawChild(ViewGroup.java:4388) at android.view.ViewGroup.dispatchDraw(ViewGroup.java:4149) at android.view.View.draw(View.java:21426) at com.android.internal.policy.DecorView.draw(DecorView.java:800) at android.view.View.updateDisplayListIfDirty(View.java:20300) at android.view.ThreadedRenderer.updateViewTreeDisplayList(ThreadedRenderer.java:575) at android.view.ThreadedRenderer.updateRootDisplayList(ThreadedRenderer.java:581) at android.view.ThreadedRenderer.draw(ThreadedRenderer.java:654) at android.view.ViewRootImpl.draw(ViewRootImpl.java:3608) at android.view.ViewRootImpl.performDraw(ViewRootImpl.java:3416) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2753) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1721) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7595) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:966) at android.view.Choreographer.doCallbacks(Choreographer.java:790) at android.view.Choreographer.doFrame(Choreographer.java:725) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:951) at android.os.Handler.handleCallback(Handler.java:883) at android.os.Handler.dispatchMessage(Handler.java:100) at android.os.Looper.loop(Looper.java:214) at android.app.ActivityThread.main(ActivityThread.java:7319) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:934) 2019-07-29 19:28:42.106 2218-2242/system_process E/system_server: Invalid ID 0x00000000. 2019-07-29 19:28:42.210 2218-7893/system_process E/eglCodecCommon: glUtilsParamSize: unknow param 0x000082da 2019-07-29 19:28:42.210 2218-7893/system_process E/eglCodecCommon: glUtilsParamSize: unknow param 0x000082da 2019-07-29 19:28:42.649 2394-2394/com.google.android.apps.nexuslauncher E/libprocessgroup: set_timerslack_ns write failed: Operation not permitted 2019-07-29 19:28:42.657 2394-2394/com.google.android.apps.nexuslauncher E/libprocessgroup: set_timerslack_ns write failed: Operation not permitted 2019-07-29 19:28:42.657 2394-2394/com.google.android.apps.nexuslauncher E/libprocessgroup: set_timerslack_ns write failed: Operation not permitted 2019-07-29 19:28:42.663 5066-5759/com.google.android.googlequicksearchbox:search E/eglCodecCommon: glUtilsParamSize: unknow param 0x000082da 2019-07-29 19:28:42.664 5066-5759/com.google.android.googlequicksearchbox:search E/eglCodecCommon: glUtilsParamSize: unknow param 0x000082da 2019-07-29 19:28:42.712 2394-2394/com.google.android.apps.nexuslauncher E/libprocessgroup: set_timerslack_ns write failed: Operation not permitted 2019-07-29 19:29:07.924 2218-2249/system_process E/memtrack: Couldn't load memtrack module
经过打断点调试之后发现bitmap为null