ScreenCapture
ScreenCapture copied to clipboard
NullPointer
lz,目前发现会有一定频率的空指针异常,暂时我还没找出问题,log如下: Process: com.branch.www.screencapture, PID: 15106 java.lang.NullPointerException: Attempt to invoke virtual method 'android.hardware.display.VirtualDisplay android.media.projection.MediaProjection.createVirtualDisplay(java.lang.String, int, int, int, int, android.view.Surface, android.hardware.display.VirtualDisplay$Callback, android.os.Handler)' on a null object reference at com.branch.www.screencapture.FloatWindowsService.virtualDisplay(FloatWindowsService.java:235) at com.branch.www.screencapture.FloatWindowsService.startVirtual(FloatWindowsService.java:215) at com.branch.www.screencapture.FloatWindowsService$2.run(FloatWindowsService.java:190) at android.os.Handler.handleCallback(Handler.java:751) at android.os.Handler.dispatchMessage(Handler.java:95) at android.os.Looper.loop(Looper.java:154) at android.app.ActivityThread.main(ActivityThread.java:6095) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)