gpt4 book ai didi

security - protected Android SharedPreferences错误: 'Caused by: java.lang.RuntimeException: Field keySize_ for...'

转载 作者:行者123 更新时间:2023-12-03 18:05:18 25 4
gpt4 key购买 nike

在 Android Kotlin 项目中,我使用 androidx.security 库基于此 link 实现了 EncryptedSharedPreference 功能,并且它在 Debug模式下运行良好。但是在 Release模式下,我不断收到此错误

  java.lang.ExceptionInInitializerError
at com.package_name.i.a.f(:46)
at com.package_name.i.a.j(:52)
at com.package_name.i.a.e(:82)
at com.package_name.MyApplication.onCreate(:37)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1013)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4707)
at android.app.ActivityThread.-wrap1(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1405)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
Caused by: java.lang.RuntimeException: Field keySize_ for k.a.d.a.h0.u not found. Known fields are [private int k.a.d.a.h0.u.i, private static final k.a.d.a.h0.u k.a.d.a.h0.u.j, private static volatile k.a.d.a.i0.a.a1 k.a.d.a.h0.u.k]
at k.a.d.a.i0.a.v0.n0(:608)

请分享您对如何解决此错误的想法。

最佳答案

此错误与 Minify Enabled 相关,这很可能会导致某些值被删除。

已经报告了一个错误,您可以在此处跟踪它:

https://issuetracker.google.com/issues/157983099

关于security - protected Android SharedPreferences错误: 'Caused by: java.lang.RuntimeException: Field keySize_ for...' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62135766/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com