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

申请截图权限会导致autojs崩溃 #129

Closed
mackerel-12138 opened this issue Jan 14, 2022 · 2 comments
Closed

申请截图权限会导致autojs崩溃 #129

mackerel-12138 opened this issue Jan 14, 2022 · 2 comments

Comments

@mackerel-12138
Copy link

Video_20220114_041555_551
系统: miui13 安卓12
autojs版本:4.1.1 alpha2/4.1.22.0128
脚本版本:1.3.6.1
autojs的权限是齐全的,autojs崩溃日志

java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=17777, result=-1, data=Intent { (has extras) }} to activity {org.autojs.autojs/org.autojs.autojs.ui.main.MainActivity_}: java.lang.NullPointerException: Attempt to invoke interface method 'boolean java.util.Set.add(java.lang.Object)' on a null object reference
	at android.app.ActivityThread.deliverResults(ActivityThread.java:5459)
	at android.app.ActivityThread.handleSendResult(ActivityThread.java:5498)
	at android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:54)
	at android.app.servertransaction.ActivityTransactionItem.execute(ActivityTransactionItem.java:45)
	at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
	at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2286)
	at android.os.Handler.dispatchMessage(Handler.java:106)
	at android.os.Looper.loopOnce(Looper.java:210)
	at android.os.Looper.loop(Looper.java:299)
	at android.app.ActivityThread.main(ActivityThread.java:8292)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:556)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1045)
Caused by: java.lang.NullPointerException: Attempt to invoke interface method 'boolean java.util.Set.add(java.lang.Object)' on a null object reference
	at android.os.Parcel.createExceptionOrNull(Parcel.java:2431)
	at android.os.Parcel.createException(Parcel.java:2409)
	at android.os.Parcel.readException(Parcel.java:2392)
	at android.os.Parcel.readException(Parcel.java:2334)
	at android.media.projection.IMediaProjection$Stub$Proxy.start(IMediaProjection.java:235)
	at android.media.projection.MediaProjection.<init>(MediaProjection.java:59)
	at android.media.projection.MediaProjectionManager.getMediaProjection(MediaProjectionManager.java:119)
	at com.stardust.autojs.core.image.capture.ScreenCapturer.refreshVirtualDisplay(ScreenCapturer.java:113)
	at com.stardust.autojs.core.image.capture.ScreenCapturer.setOrientation(ScreenCapturer.java:96)
	at com.stardust.autojs.core.image.capture.ScreenCapturer.<init>(ScreenCapturer.java:65)
	at com.stardust.autojs.runtime.api.Images.lambda$requestScreenCapture$0$Images(Images.java:89)
	at com.stardust.autojs.runtime.api.-$$Lambda$Images$GSIIe6600GdHA8tlSbdwwWIzoHU.onRequestResult(Unknown Source:10)
	at com.stardust.autojs.AutoJs$ScreenCaptureRequesterImpl.lambda$setOnActivityResultCallback$0$AutoJs$ScreenCaptureRequesterImpl(AutoJs.java:249)
	at com.stardust.autojs.-$$Lambda$AutoJs$ScreenCaptureRequesterImpl$5xtU9iuEaX8cgdQlNp6Ctwdbnng.onRequestResult(Unknown Source:4)
	at com.stardust.autojs.core.image.capture.ScreenCaptureRequester$AbstractScreenCaptureRequester.onResult(ScreenCaptureRequester.java:43)
	at com.stardust.autojs.core.image.capture.ScreenCaptureRequester$ActivityScreenCaptureRequester.onActivityResult(ScreenCaptureRequester.java:78)
	at com.stardust.app.OnActivityResultDelegate$Mediator.onActivityResult(OnActivityResultDelegate.java:31)
	at org.autojs.autojs.ui.main.MainActivity.onActivityResult(MainActivity.java:239)
	at android.app.Activity.dispatchActivityResult(Activity.java:8633)
	at android.app.ActivityThread.deliverResults(ActivityThread.java:5452)
	... 13 more
Caused by: android.os.RemoteException: Remote stack trace:
	at com.android.server.media.projection.MediaProjectionManagerService$MediaProjection.start(MediaProjectionManagerService.java:553)
	at android.media.projection.IMediaProjection$Stub.onTransact(IMediaProjection.java:137)
	at android.os.Binder.execTransactInternal(Binder.java:1182)
	at android.os.Binder.execTransact(Binder.java:1146)
@TonyJiangWJ
Copy link
Owner

是AutoJS免费版不兼容MIUI13的安卓12 需要一个特殊版本 可以加群 在群文件里面有

@TonyJiangWJ
Copy link
Owner

#131

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

2 participants