我的应用程序在设备android <9上运行良好,但是在android 9上我遇到以下错误,我尝试删除样式,但出现相同的错误,尽管这是OkHttp请求,但我还是尝试完全删除OkHttpClientClient从应用程序类生成器,但似乎没有任何效果:( 有任何想法吗?
E/AndroidRuntime: FATAL EXCEPTION: main
Process: io.a.software.app, PID: 10551
java.lang.RuntimeException: Unable to start activity ComponentInfo{io.a.software.app/io.a.software.app.ui.SplashActivity}: java.lang.SecurityException: Call from user 0 as user -1 without permission INTERACT_ACROSS_USERS or INTERACT_ACROSS_USERS_FULL not allowed.
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2902)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3037)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1797)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6642)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
Caused by: java.lang.SecurityException: Call from user 0 as user -1 without permission INTERACT_ACROSS_USERS or INTERACT_ACROSS_USERS_FULL not allowed.
at android.os.Parcel.createException(Parcel.java:1942)
at android.os.Parcel.readException(Parcel.java:1910)
at android.os.Parcel.readException(Parcel.java:1860)
at android.view.accessibility.IAccessibilityManager$Stub$Proxy.addClient(IAccessibilityManager.java:295)
at android.view.accessibility.AccessibilityManager.tryConnectToServiceLocked(AccessibilityManager.java:1125)
at android.view.accessibility.AccessibilityManager.<init>(AccessibilityManager.java:358)
at android.view.accessibility.AccessibilityManager.getInstance(AccessibilityManager.java:336)
at android.view.View.setFlags(View.java:14010)
at android.view.View.<init>(View.java:5565)
at android.view.ViewGroup.<init>(ViewGroup.java:659)
at android.view.ViewGroup.<init>(ViewGroup.java:655)
at android.view.ViewGroup.<init>(ViewGroup.java:651)
at android.view.ViewGroup.<init>(ViewGroup.java:647)
at android.widget.FrameLayout.<init>(FrameLayout.java:78)
at com.android.internal.policy.DecorView.<init>(DecorView.java:255)
at com.android.internal.policy.PhoneWindow.generateDecor(PhoneWindow.java:2305)
at com.android.internal.policy.PhoneWindow.installDecor(PhoneWindow.java:2657)
at com.android.internal.policy.PhoneWindow.setContentView(PhoneWindow.java:410)
at android.app.Activity.setContentView(Activity.java:2769)
at io.a.software.app.ui.SplashActivity.onCreate(SplashActivity.kt:28)
at android.app.Activity.performCreate(Activity.java:7131)
at android.app.Activity.performCreate(Activity.java:7122)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1271)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2882)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3037)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1797)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6642)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
Caused by: android.os.RemoteException: Remote stack trace:
at com.android.server.accessibility.AccessibilityManagerService$SecurityPolicy.resolveCallingUserIdEnforcingPermissionsLocked(AccessibilityManagerService.java:3522)
at com.android.server.accessibility.AccessibilityManagerService.addClient(AccessibilityManagerService.java:487)
at android.view.accessibility.IAccessibilityManager$Stub.onTransact(IAccessibilityManager.java:82)
at android.os.Binder.execTransact(Binder.java:731)
这是我的XML SplashCreen文件 activity_splash.xml
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:gravity="center"
android:background="@android:color/white">
<ImageView
android:layout_width="wrap_content"
android:layout_height="200dp"
android:layout_marginBottom="20dp"
android:scaleType="centerInside"
android:src="@drawable/ic_logo"/>
<ProgressBar
android:layout_width="wrap_content"
android:layout_height="wrap_content" />