Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

android.content.ActivityNotFoundException #59

Open
ZakAnun opened this issue May 14, 2021 · 0 comments
Open

android.content.ActivityNotFoundException #59

ZakAnun opened this issue May 14, 2021 · 0 comments

Comments

@ZakAnun
Copy link

ZakAnun commented May 14, 2021

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,但是这样的话录屏就无法继续进行了。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant