android - 在 Samsung Galaxt S9 (Oreo) 上显示安全异常
问题描述
我的应用程序可在除三星 Galaxy S9 (Oreo) 之外的所有其他设备上运行。
那是我唯一的奥利奥手机。它工作正常的所有其他手机(Moto g4 plus、三星 A8、三星 Galaxy S7 等)。
奥利奥中是否添加了任何新的安全功能?
我无法发现它。有谁知道?
在下面登录
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;
}
问题已解决。有关更多详细信息,请参见此处的答案。
推荐阅读
- micronaut - Micronaut 数据:没有为存储库配置支持 RepositoryOperations
- c# - 发布为 Windows 服务后,在 .net core 3.0 worker 服务上获取 appsettings.json 值
- java - 如何编写基于先前功能的 Cucumber 测试?
- typescript - Typescript 中与通用容器混淆的错误
- powershell - 如何搜索出现在 TCP Connections 中超过 4 次的 aa 进程的文件路径
- mysql - 使用 ID 计算 DATEDIFF
- c# - C# Selenium IE 驱动程序打开子窗口,看起来它已经完全加载,但实际上是一个空白的 HTML 页面
- tensorflow - 在 CPU 上使用 mobilenetv2 的 cifar10 dadatset 没有获得正确的准确性
- python - “'bool'对象不可调用”的含义?
- winforms - Telerik Radscheduler for Winform 在一个时间段内进行多个约会