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

the app crashes #6

Open
swizzych opened this issue Jul 14, 2023 · 2 comments
Open

the app crashes #6

swizzych opened this issue Jul 14, 2023 · 2 comments

Comments

@swizzych
Copy link

swizzych commented Jul 14, 2023

hi, I added your video recording to my project, but unfortunately the application just crashes when you click on the start recording button, it also gives an error log, I'm just starting to work in everything related to Unity, tell me what's wrong, here's the error log

07-14 16:38:43.081 8704 8759 E Unity : AndroidJavaException: java.lang.NoSuchMethodError: no non-static method with name='hasPermission' signature='(Ljava/lang/String;)Z' in class Lcom.unity3d.player.UnityPlayerActivity;
07-14 16:38:43.081 8704 8759 E Unity : java.lang.NoSuchMethodError: no non-static method with name='hasPermission' signature='(Ljava/lang/String;)Z' in class Lcom.unity3d.player.UnityPlayerActivity;
07-14 16:38:43.081 8704 8759 E Unity : at com.unity3d.player.ReflectionHelper.getMethodID(Unknown Source:162)
07-14 16:38:43.081 8704 8759 E Unity : at com.unity3d.player.UnityPlayer.nativeRender(Native Method)
07-14 16:38:43.081 8704 8759 E Unity : at com.unity3d.player.UnityPlayer.access$300(Unknown Source:0)
07-14 16:38:43.081 8704 8759 E Unity : at com.unity3d.player.UnityPlayer$e$1.handleMessage(Unknown Source:95)
07-14 16:38:43.081 8704 8759 E Unity : at android.os.Handler.dispatchMessage(Handler.java:102)
07-14 16:38:43.081 8704 8759 E Unity : at android.os.Looper.loopOnce(Looper.java:210)
07-14 16:38:43.081 8704 8759 E Unity : at android.os.Looper.loop(Looper.java:299)
07-14 16:38:43.081 8704 8759 E Unity : at com.unity3d.player.UnityPlayer$e.run(Unknown Source:20)
07-14 16:38:43.081 8704 8759 E Unity : at UnityEngine._AndroidJNIHelper.GetMethodID (System.IntPtr jclass, System.String methodName, System.String signature, System.Boolean isStatic) [0x00000] in <00000000000000000000000000000000>:0
07-14 16:38:43.081 8704 8759 E Unity : at

@swizzych
Copy link
Author

java.lang.Error: FATAL EXCEPTION [main]
Unity version : 2021.3.9f1
Device model : Xiaomi M2012K11AG
Device fingerprint: POCO/alioth_ru/alioth:13/TKQ1.220829.002/V14.0.2.0.TKHRUXM:user/release-keys
Build Type : Release
Scripting Backend : IL2CPP
ABI : arm64-v8a
Strip Engine Code : true

Caused by: java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=200, result=-1, data=Intent { (has extras) }} to activity {ru.funreality.funreality/com.setik.kampertee.AndroidUtils}: java.lang.SecurityException: Media projections require a foreground service of type ServiceInfo.FOREGROUND_SERVICE_TYPE_MEDIA_PROJECTION
at android.app.ActivityThread.deliverResults(ActivityThread.java:5527)
at android.app.ActivityThread.handleSendResult(ActivityThread.java:5566)
at android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:67)
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:2389)
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:8261)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:559)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:954)
Caused by: java.lang.SecurityException: Media projections require a foreground service of type ServiceInfo.FOREGROUND_SERVICE_TYPE_MEDIA_PROJECTION
at android.os.Parcel.createExceptionOrNull(Parcel.java:3011)
at android.os.Parcel.createException(Parcel.java:2995)
at android.os.Parcel.readException(Parcel.java:2978)
at android.os.Parcel.readException(Parcel.java:2920)
at android.media.projection.IMediaProjection$Stub$Proxy.start(IMediaProjection.java:268)
at android.media.projection.MediaProjection.(MediaProjection.java:63)
at android.media.projection.MediaProjectionManager.getMediaProjection(MediaProjectionManager.java:134)
at com.setik.kampertee.AndroidUtils.onActivityResult(AndroidUtils.java:50)
at android.app.Activity.dispatchActivityResult(Activity.java:8901)
at android.app.ActivityThread.deliverResults(ActivityThread.java:5520)
... 13 more
Caused by: android.os.RemoteException: Remote stack trace:
at com.android.server.media.projection.MediaProjectionManagerService$MediaProjection.start(MediaProjectionManagerService.java:587)
at android.media.projection.IMediaProjection$Stub.onTransact(IMediaProjection.java:163)
at android.os.Binder.execTransactInternal(Binder.java:1285)
at android.os.Binder.execTransact(Binder.java:1249)

@thanh-nguyen-kim
Copy link
Owner

Hi
Which version of Android you are currently using?

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