在 Samsung Galaxy S9 (Oreo) 上显示安全异常
Showing security exception on Samsung Galaxt S9 (Oreo)
我的应用程序可以在除 Samsung Galaxy S9 (Oreo) 之外的所有其他设备上运行。
这是我唯一的 phone 奥利奥。所有其他 phones 它工作正常(Moto g4 plus、三星 A8、三星 galaxy S7 和许多其他)。
oreo 中是否添加了任何新的安全功能?
我没发现。有人知道吗?
在下方登录
java.lang.SecurityException:
at android.os.Parcel.readException (Parcel.java:1958)
at android.os.Parcel.readException (Parcel.java:1904)
at android.view.autofill.IAutoFillManager$Stub$Proxy.addClient (IAutoFillManager.java:326)
at android.view.autofill.AutofillManager.ensureServiceClientAddedIfNeededLocked (AutofillManager.java:896)
at android.view.autofill.AutofillManager.notifyViewExited (AutofillManager.java:487)
at android.view.View.notifyEnterOrExitForAutoFillIfNeeded (View.java:7577)
at android.view.View.dispatchAttachedToWindow (View.java:18627)
at android.view.ViewGroup.dispatchAttachedToWindow (ViewGroup.java:3527)
at android.view.ViewGroup.dispatchAttachedToWindow (ViewGroup.java:3527)
at android.view.ViewGroup.dispatchAttachedToWindow (ViewGroup.java:3527)
at android.view.ViewGroup.dispatchAttachedToWindow (ViewGroup.java:3527)
at android.view.ViewGroup.dispatchAttachedToWindow (ViewGroup.java:3527)
at android.view.ViewGroup.dispatchAttachedToWindow (ViewGroup.java:3527)
at android.view.ViewGroup.dispatchAttachedToWindow (ViewGroup.java:3527)
at android.view.ViewRootImpl.performTraversals (ViewRootImpl.java:2030)
at android.view.ViewRootImpl.doTraversal (ViewRootImpl.java:1738)
at android.view.ViewRootImpl$TraversalRunnable.run (ViewRootImpl.java:7745)
at android.view.Choreographer$CallbackRecord.run (Choreographer.java:911)
at android.view.Choreographer.doCallbacks (Choreographer.java:723)
at android.view.Choreographer.doFrame (Choreographer.java:658)
at android.view.Choreographer$FrameDisplayEventReceiver.run (Choreographer.java:897)
at android.os.Handler.handleCallback (Handler.java:789)
at android.os.Handler.dispatchMessage (Handler.java:98)
at android.os.Looper.loop (Looper.java:164)
at android.app.ActivityThread.main (ActivityThread.java:6938)
at java.lang.reflect.Method.invoke (Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run (Zygote.java:327)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1374)
帮我解决问题。
我的 Activity 上有 getUserId() 方法。我刚刚重命名为 getUserID()(正如他们在 接受的答案中所说的那样)。
之前是
public int getUserId() {
SharedPreferences app_preferences = PreferenceManager.getDefaultSharedPreferences(getBaseContext());
int temp = app_preferences.getInt("UserId", 0);
return temp;
}
现在我改成了
public int getUserID() {
SharedPreferences app_preferences = PreferenceManager.getDefaultSharedPreferences(getBaseContext());
int temp = app_preferences.getInt("UserId", 0);
return temp;
}
问题已解决。有关详细信息,请参阅答案 。
我的应用程序可以在除 Samsung Galaxy S9 (Oreo) 之外的所有其他设备上运行。
这是我唯一的 phone 奥利奥。所有其他 phones 它工作正常(Moto g4 plus、三星 A8、三星 galaxy S7 和许多其他)。
oreo 中是否添加了任何新的安全功能?
我没发现。有人知道吗?
在下方登录
java.lang.SecurityException:
at android.os.Parcel.readException (Parcel.java:1958)
at android.os.Parcel.readException (Parcel.java:1904)
at android.view.autofill.IAutoFillManager$Stub$Proxy.addClient (IAutoFillManager.java:326)
at android.view.autofill.AutofillManager.ensureServiceClientAddedIfNeededLocked (AutofillManager.java:896)
at android.view.autofill.AutofillManager.notifyViewExited (AutofillManager.java:487)
at android.view.View.notifyEnterOrExitForAutoFillIfNeeded (View.java:7577)
at android.view.View.dispatchAttachedToWindow (View.java:18627)
at android.view.ViewGroup.dispatchAttachedToWindow (ViewGroup.java:3527)
at android.view.ViewGroup.dispatchAttachedToWindow (ViewGroup.java:3527)
at android.view.ViewGroup.dispatchAttachedToWindow (ViewGroup.java:3527)
at android.view.ViewGroup.dispatchAttachedToWindow (ViewGroup.java:3527)
at android.view.ViewGroup.dispatchAttachedToWindow (ViewGroup.java:3527)
at android.view.ViewGroup.dispatchAttachedToWindow (ViewGroup.java:3527)
at android.view.ViewGroup.dispatchAttachedToWindow (ViewGroup.java:3527)
at android.view.ViewRootImpl.performTraversals (ViewRootImpl.java:2030)
at android.view.ViewRootImpl.doTraversal (ViewRootImpl.java:1738)
at android.view.ViewRootImpl$TraversalRunnable.run (ViewRootImpl.java:7745)
at android.view.Choreographer$CallbackRecord.run (Choreographer.java:911)
at android.view.Choreographer.doCallbacks (Choreographer.java:723)
at android.view.Choreographer.doFrame (Choreographer.java:658)
at android.view.Choreographer$FrameDisplayEventReceiver.run (Choreographer.java:897)
at android.os.Handler.handleCallback (Handler.java:789)
at android.os.Handler.dispatchMessage (Handler.java:98)
at android.os.Looper.loop (Looper.java:164)
at android.app.ActivityThread.main (ActivityThread.java:6938)
at java.lang.reflect.Method.invoke (Native Method)
at com.android.internal.os.Zygote$MethodAndArgsCaller.run (Zygote.java:327)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1374)
我的 Activity 上有 getUserId() 方法。我刚刚重命名为 getUserID()(正如他们在
之前是
public int getUserId() {
SharedPreferences app_preferences = PreferenceManager.getDefaultSharedPreferences(getBaseContext());
int temp = app_preferences.getInt("UserId", 0);
return temp;
}
现在我改成了
public int getUserID() {
SharedPreferences app_preferences = PreferenceManager.getDefaultSharedPreferences(getBaseContext());
int temp = app_preferences.getInt("UserId", 0);
return temp;
}
问题已解决。有关详细信息,请参阅答案