ScreenRecorder
ScreenRecorder copied to clipboard
android.content.ActivityNotFoundException
hello~
我发现在华为 5.0 的机器上面会抛出这个异常 05-14 12:54:14.410 31349-31349/net.yrom.screenrecorder.demo W/System.err: android.content.ActivityNotFoundException: Unable to find explicit activity class {com.android.systemui/com.android.systemui.media.MediaProjectionPermissionActivity}; have you declared this activity in your AndroidManifest.xml? 05-14 12:54:14.470 31349-31349/net.yrom.screenrecorder.demo W/System.err: at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1772) 05-14 12:54:14.470 31349-31349/net.yrom.screenrecorder.demo W/System.err: at android.app.Instrumentation.execStartActivity(Instrumentation.java:1496) 05-14 12:54:14.470 31349-31349/net.yrom.screenrecorder.demo W/System.err: at android.app.Activity.startActivityForResult(Activity.java:3801) 05-14 12:54:14.470 31349-31349/net.yrom.screenrecorder.demo W/System.err: at android.app.Activity.startActivityForResult(Activity.java:3755) 05-14 12:54:14.470 31349-31349/net.yrom.screenrecorder.demo W/System.err: at net.yrom.screenrecorder.MainActivity.requestMediaProjection(MainActivity.java:329) 05-14 12:54:14.470 31349-31349/net.yrom.screenrecorder.demo W/System.err: at net.yrom.screenrecorder.MainActivity.onButtonClick(MainActivity.java:392) 05-14 12:54:14.470 31349-31349/net.yrom.screenrecorder.demo W/System.err: at net.yrom.screenrecorder.MainActivity.lambda$UwpWlceQTdO30lLBfT5KEI-6xLE(MainActivity.java) 05-14 12:54:14.470 31349-31349/net.yrom.screenrecorder.demo W/System.err: at net.yrom.screenrecorder.-$$Lambda$MainActivity$UwpWlceQTdO30lLBfT5KEI-6xLE.onClick(lambda) 05-14 12:54:14.470 31349-31349/net.yrom.screenrecorder.demo W/System.err: at android.view.View.performClick(View.java:4768) 05-14 12:54:14.470 31349-31349/net.yrom.screenrecorder.demo W/System.err: at android.view.View$PerformClick.run(View.java:19692) 05-14 12:54:14.470 31349-31349/net.yrom.screenrecorder.demo W/System.err: at android.os.Handler.handleCallback(Handler.java:739) 05-14 12:54:14.470 31349-31349/net.yrom.screenrecorder.demo W/System.err: at android.os.Handler.dispatchMessage(Handler.java:95) 05-14 12:54:14.470 31349-31349/net.yrom.screenrecorder.demo W/System.err: at android.os.Looper.loop(Looper.java:135) 05-14 12:54:14.470 31349-31349/net.yrom.screenrecorder.demo W/System.err: at android.app.ActivityThread.main(ActivityThread.java:5564) 05-14 12:54:14.470 31349-31349/net.yrom.screenrecorder.demo W/System.err: at java.lang.reflect.Method.invoke(Native Method) 05-14 12:54:14.470 31349-31349/net.yrom.screenrecorder.demo W/System.err: at java.lang.reflect.Method.invoke(Method.java:372) 05-14 12:54:14.470 31349-31349/net.yrom.screenrecorder.demo W/System.err: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:960) 05-14 12:54:14.470 31349-31349/net.yrom.screenrecorder.demo W/System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:755) 05-14 12:54:14.480 31349-31349/net.yrom.screenrecorder.demo E/@@: media projection is null
录屏的功能就用不了了,请问有人遇到这个情况吗? 目前是将请求录屏的代码包上 try - catch,但是这样的话录屏就无法继续进行了。