gpt4 book ai didi

android - 无法获取提供程序 android.arch.lifecycle.LifecycleRuntimeTrojanProvider : java. lang.ClassNotFoundException

转载 作者:塔克拉玛干 更新时间:2023-11-03 00:34:19 25 4
gpt4 key购买 nike

我在 api 低于 21 时收到此类未找到错误,即使谷歌表示它支持到 api 14

我已经在 android studio 3.0 beta 6 上试过了

09-19 17:12:39.273 2794-2794/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: xxxx, PID: 2794
java.lang.RuntimeException: Unable to get provider android.arch.lifecycle.LifecycleRuntimeTrojanProvider: java.lang.ClassNotFoundException: Didn't find class "android.arch.lifecycle.LifecycleRuntimeTrojanProvider" on path: DexPathList[[zip file "/data/app/xxxx-1.apk"],nativeLibraryDirectories=[/data/app-lib/xxxx-1, /vendor/lib, /system/lib]]
at android.app.ActivityThread.installProvider(ActivityThread.java:4793)
at android.app.ActivityThread.installContentProviders(ActivityThread.java:4385)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4325)
at android.app.ActivityThread.access$1500(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5017)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:779)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ClassNotFoundException: Didn't find class "android.arch.lifecycle.LifecycleRuntimeTrojanProvider" on path: DexPathList[[zip file "/data/app/xxxxx-1.apk"],nativeLibraryDirectories=[/data/app-lib/xxxxx-1, /vendor/lib, /system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:497)
at java.lang.ClassLoader.loadClass(ClassLoader.java:457)

我一直在使用 kotlin 进行开发。

// architecture components
implementation "android.arch.lifecycle:runtime:$arch_version"
implementation "android.arch.lifecycle:extensions:$arch_version"
kapt "android.arch.lifecycle:compiler:$arch_version"

arch 版本是最新的 ext.arch_version = '1.0.0-alpha9-1'构建工具 -> ext.buildToolsVersion = '26.0.1'

我已经检查过其他解决方案说禁用 minify 和 proguard 我已经测试过它们

        debug {
// applicationIdSuffix '.debug' // Remove to fix Robolectric problem
versionNameSuffix '-DEBUG'
debuggable true
minifyEnabled false
useProguard false
multiDexEnabled true

最佳答案

禁用 Instant Run 对我有用。 (设置 -> 构建、执行、部署 -> 即时运行 -> 取消选中“启用即时运行”)

关于android - 无法获取提供程序 android.arch.lifecycle.LifecycleRuntimeTrojanProvider : java. lang.ClassNotFoundException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46304196/

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