在三星Galaxt S9(奥利奥)上显示安全例外

时间:2018-04-27 08:13:18

标签: android android-8.0-oreo android-securityexception

我的应用程序可在除三星Galaxy S9(奥利奥)以外的所有其他设备上运行。

这是我与奥利奥的唯一电话。所有其他手机工作正常(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)

1 个答案:

答案 0 :(得分:0)

This link帮助我解决了这个问题。

我的Activity上有 getUserId()方法。我刚刚重命名为 getUserID()(正如他们在this接受的答案中所说的那样)。

以前是

 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;
}

问题已解决..有关详细信息,请参阅答案here