您的位置:首页 > 汽车 > 时评 > 渠道打包报错 快手

渠道打包报错 快手

2025/1/8 19:46:40 来源:https://blog.csdn.net/qq_42015021/article/details/142179913  浏览:    关键词:渠道打包报错 快手

20240912 快手最新资源

问题1-Unable to get provider androidx.lifecycle.ProcessLifecycleOwnerInitializer

使用快手基础版 + 下面所示资源配置。提示下面报错
在这里插入图片描述

	<config name = "kuaishou"><!--填写渠道方的maven仓库地址,格式:maven {url 'xxx'},可配置多个--><mavenUrl></mavenUrl><!--填写渠道方要求的classpath配置,格式:classpath 'xxx',可配置多个--><classpath><!--classpath 'com.android.tools.build:gradle:3.3.2'--></classpath><!--填写渠道方要求的applyPlugin配置,格式:apply plugin:'xxx',可配置多个--><applyPlugin></applyPlugin><!--填写渠道方要求的defaultConfig配置,可配置多个--><defaultConfig></defaultConfig><!--填写渠道方要求的packagingOptions配置,格式:pickFirst 'xxx',可配置多个--><packagingOptions></packagingOptions><!--填写渠道方依赖的android资源(不会合并到输出资源中),格式:implementation 'xxx',可配置多个--><implementation>
<!-- 			implementation 'com.squareup.okhttp3:okhttp:3.10.0'implementation 'com.google.protobuf.nano:protobuf-javanano:3.1.0'implementation 'com.getkeepsafe.relinker:relinker:1.3.0'implementation 'android.arch.lifecycle:extensions:1.1.1'implementation 'com.google.code.gson:gson:2.8.5'implementation 'io.reactivex.rxjava2:rxjava:2.1.9'implementation 'io.reactivex.rxjava2:rxandroid:2.0.1'implementation 'org.greenrobot:greendao:3.1.1'implementation 'com.google.dagger:dagger:2.23'implementation 'android.arch.persistence.room:runtime:1.1.1'implementation 'com.jakewharton.rxrelay2:rxrelay:2.0.0'implementation 'com.android.support:support-annotations:27.1.1'implementation 'com.google.guava:guava:24.0-android'implementation 'com.squareup.retrofit2:retrofit:2.4.0'implementation 'com.squareup.retrofit2:converter-gson:2.4.0'implementation 'com.squareup.retrofit2:adapter-rxjava2:2.4.0'implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.72' --><!-- 	implementation 'com.android.support:appcompat-v7:26.1.0' -->
<!-- 			implementation 'com.squareup.retrofit2:converter-scalars:2.4.0' -->implementation 'com.android.support:appcompat-v7:28.0.0'</implementation><!--填写渠道方要求的需要通过maven集成的aar资源(注意将implementation替换成embed),格式:embed 'xxx',可配置多个--><embedMavenAAR>embed 'com.squareup.okhttp3:okhttp:3.10.0'embed 'com.google.protobuf.nano:protobuf-javanano:3.1.0'embed 'com.getkeepsafe.relinker:relinker:1.3.0'embed 'android.arch.lifecycle:extensions:1.1.1'embed 'com.google.code.gson:gson:2.8.5'embed 'io.reactivex.rxjava2:rxjava:2.1.9'embed 'io.reactivex.rxjava2:rxandroid:2.0.1'embed 'org.greenrobot:greendao:3.1.1'embed 'com.google.dagger:dagger:2.23'embed ('android.arch.persistence.room:runtime:1.1.1'){exclude group: 'com.android.support' exclude group: 'android.arch.core'}embed 'com.jakewharton.rxrelay2:rxrelay:2.0.0'<!-- 			embed ('com.android.support:support-annotations:28.0.0'){exclude group: 'com.android.support',module: 'support-v4'}-->		embed 'com.google.guava:guava:24.0-android'embed 'com.squareup.retrofit2:retrofit:2.4.0'embed 'com.squareup.retrofit2:converter-gson:2.4.0'embed 'com.squareup.retrofit2:adapter-rxjava2:2.4.0'embed 'org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.72'embed ('com.android.support:appcompat-v7:28.0.0'){exclude group: 'com.android.support',module: 'support-v4' exclude group: 'android.arch.lifecycle' exclude group: 'android.arch.core'}<!-- embed ('com.android.support:appcompat-v7:28.0.0') -->embed 'com.squareup.retrofit2:converter-scalars:2.4.0'</embedMavenAAR><!--填写渠道方要求的需要集成的本地aar资源(注意将implementation替换成embed),格式:embed(name:'xxx',ext:'aar'),可配置多个--><embedLocalAAR>embed (name:'AlipaySdk-15.8.01.20210112203525',ext:'aar')embed (name:'kwaisdk-base-release-1.4.3-218',ext:'aar')</embedLocalAAR></config>
2024-09-12 15:56:12.298 31147-31147 AndroidRuntime          pid-31147                            E  FATAL EXCEPTION: mainProcess: cn.jj.log.kuaishou, PID: 31147java.lang.RuntimeException: Unable to get provider androidx.lifecycle.ProcessLifecycleOwnerInitializer: java.lang.ClassNotFoundException: Didn't find class "androidx.lifecycle.ProcessLifecycleOwnerInitializer" on path: DexPathList[[zip file "/data/app/~~uSKn_5F0lQKHEHBOTMPuyQ==/cn.jj.log.kuaishou-8Uamc0Vav6Xy2_hUA4kVag==/base.apk"],nativeLibraryDirectories=[/data/app/~~uSKn_5F0lQKHEHBOTMPuyQ==/cn.jj.log.kuaishou-8Uamc0Vav6Xy2_hUA4kVag==/lib/arm64, /data/app/~~uSKn_5F0lQKHEHBOTMPuyQ==/cn.jj.log.kuaishou-8Uamc0Vav6Xy2_hUA4kVag==/base.apk!/lib/arm64-v8a, /system/lib64, /system_ext/lib64]]at android.app.ActivityThread.installProvider(ActivityThread.java:8383)at android.app.ActivityThread.installContentProviders(ActivityThread.java:7889)at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7576)at android.app.ActivityThread.-$$Nest$mhandleBindApplication(Unknown Source:0)at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2428)at android.os.Handler.dispatchMessage(Handler.java:106)at android.os.Looper.loopOnce(Looper.java:257)at android.os.Looper.loop(Looper.java:368)at android.app.ActivityThread.main(ActivityThread.java:8839)at java.lang.reflect.Method.invoke(Native Method)at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:572)at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1049)Caused by: java.lang.ClassNotFoundException: Didn't find class "androidx.lifecycle.ProcessLifecycleOwnerInitializer" on path: DexPathList[[zip file "/data/app/~~uSKn_5F0lQKHEHBOTMPuyQ==/cn.jj.log.kuaishou-8Uamc0Vav6Xy2_hUA4kVag==/base.apk"],nativeLibraryDirectories=[/data/app/~~uSKn_5F0lQKHEHBOTMPuyQ==/cn.jj.log.kuaishou-8Uamc0Vav6Xy2_hUA4kVag==/lib/arm64, /data/app/~~uSKn_5F0lQKHEHBOTMPuyQ==/cn.jj.log.kuaishou-8Uamc0Vav6Xy2_hUA4kVag==/base.apk!/lib/arm64-v8a, /system/lib64, /system_ext/lib64]]at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:259)at java.lang.ClassLoader.loadClass(ClassLoader.java:379)at java.lang.ClassLoader.loadClass(ClassLoader.java:312)at android.app.AppComponentFactory.instantiateProvider(AppComponentFactory.java:147)at androidx.core.app.CoreComponentFactory.instantiateProvider(CoreComponentFactory.java:67)at android.app.ActivityThread.installProvider(ActivityThread.java:8367)at android.app.ActivityThread.installContentProviders(ActivityThread.java:7889) at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7576) at android.app.ActivityThread.-$$Nest$mhandleBindApplication(Unknown Source:0) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2428) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loopOnce(Looper.java:257) at android.os.Looper.loop(Looper.java:368) at android.app.ActivityThread.main(ActivityThread.java:8839) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:572) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1049) 

解决方法:
gradle.properties中将android.enableJetifier=true,重新整理资源。
在这里插入图片描述

问题2-android/arch/lifecycle/ProcessLifecycleOwner

2024-09-12 16:51:55.815 10370-10370 AndroidRuntime          pid-10370                            E  FATAL EXCEPTION: mainProcess: cn.jj.log.kuaishou, PID: 10370java.lang.NoClassDefFoundError: Failed resolution of: Landroid/arch/lifecycle/ProcessLifecycleOwner;at com.kwai.middleware.azeroth.Azeroth2$initAppLifecycle$1.invoke(Azeroth2.kt:0)at com.kwai.middleware.azeroth.Azeroth2$initAppLifecycle$1.invoke(Azeroth2.kt:0)at com.kwai.middleware.skywalker.ext.ContextExtKt.runOnUiThread(ContextExt.kt:4)at com.kwai.middleware.azeroth.Azeroth2.initAppLifecycle(Azeroth2.kt:5)at com.kwai.middleware.azeroth.Azeroth2.realInit(Azeroth2.kt:63)at com.kwai.middleware.azeroth.Azeroth2.init(Azeroth2.kt:0)at com.kwai.middleware.azeroth.Azeroth.init(Azeroth.java:17)at com.kwai.component.a.b.a(AzerothHelper.java:11)at com.kwai.sdk.combus.init.AzerothInitHelper.init(AzerothInitHelper.java:5)at com.kwai.sdk.combus.init.d.a(KwaiSdkInitHelper.java:58)at com.kwai.sdk.KwaiSdk.init(KwaiSdk.java:0)at cn.jj.channel.separate.online.TKOnlineChannelKuaiShou.initInApplication(TKOnlineChannelKuaiShou.java:37)at O0000oOO.O000000o(ChannelMgrImpl.java:59)at O0000oo0.O000000o(TKChannelManager.java:6)at O00000Oo.O000000o(TKAggregationManager.java:6)at cn.jj.aggregationsdk.TKAggregationSDK.initInApplication(TKAggregationSDK.java:1)at cn.jj.union.TankApplication.onCreate(TankApplication.java:24)at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1335)at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7594)at android.app.ActivityThread.-$$Nest$mhandleBindApplication(Unknown Source:0)at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2428)at android.os.Handler.dispatchMessage(Handler.java:106)at android.os.Looper.loopOnce(Looper.java:257)at android.os.Looper.loop(Looper.java:368)at android.app.ActivityThread.main(ActivityThread.java:8839)at java.lang.reflect.Method.invoke(Native Method)at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:572)at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1049)Caused by: java.lang.ClassNotFoundException: android.arch.lifecycle.ProcessLifecycleOwnerat com.kwai.middleware.azeroth.Azeroth2$initAppLifecycle$1.invoke(Azeroth2.kt:0) at com.kwai.middleware.azeroth.Azeroth2$initAppLifecycle$1.invoke(Azeroth2.kt:0) at com.kwai.middleware.skywalker.ext.ContextExtKt.runOnUiThread(ContextExt.kt:4) at com.kwai.middleware.azeroth.Azeroth2.initAppLifecycle(Azeroth2.kt:5) at com.kwai.middleware.azeroth.Azeroth2.realInit(Azeroth2.kt:63) at com.kwai.middleware.azeroth.Azeroth2.init(Azeroth2.kt:0) at com.kwai.middleware.azeroth.Azeroth.init(Azeroth.java:17) at com.kwai.component.a.b.a(AzerothHelper.java:11) at com.kwai.sdk.combus.init.AzerothInitHelper.init(AzerothInitHelper.java:5) at com.kwai.sdk.combus.init.d.a(KwaiSdkInitHelper.java:58) at com.kwai.sdk.KwaiSdk.init(KwaiSdk.java:0) at cn.jj.channel.separate.online.TKOnlineChannelKuaiShou.initInApplication(TKOnlineChannelKuaiShou.java:37) at O0000oOO.O000000o(ChannelMgrImpl.java:59) at O0000oo0.O000000o(TKChannelManager.java:6) at O00000Oo.O000000o(TKAggregationManager.java:6) at cn.jj.aggregationsdk.TKAggregationSDK.initInApplication(TKAggregationSDK.java:1) at cn.jj.union.TankApplication.onCreate(TankApplication.java:24) at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1335) at android.app.ActivityThread.handleBindApplication(ActivityThread.java:7594) at android.app.ActivityThread.-$$Nest$mhandleBindApplication(Unknown Source:0) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2428) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loopOnce(Looper.java:257) at android.os.Looper.loop(Looper.java:368) at android.app.ActivityThread.main(ActivityThread.java:8839) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:572) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1049) 

需要导入下面的这些资源:
在这里插入图片描述

问题3-Failed resolution of: Landroid/arch/persistence/room/RoomDatabase$JournalMode;

2024-09-12 20:27:44.320  5145-5527  AndroidRuntime          pid-5145                             E  FATAL EXCEPTION: vader-1-1Process: cn.jj.log.kuaishou, PID: 5145java.lang.NoClassDefFoundError: Failed resolution of: Landroid/arch/persistence/room/RoomDatabase$JournalMode;at com.kuaishou.android.vader.dagger.VaderModule.getSuggestedMode(VaderModule.java:0)at com.kuaishou.android.vader.dagger.VaderModule.provideDatabase(VaderModule.java:0)at com.kuaishou.android.vader.dagger.VaderModule_ProvideDatabaseFactory.provideDatabase(VaderModule_ProvideDatabaseFactory.java:0)at com.kuaishou.android.vader.dagger.VaderModule_ProvideDatabaseFactory.get(VaderModule_ProvideDatabaseFactory.java:0)at com.kuaishou.android.vader.dagger.VaderModule_ProvideDatabaseFactory.get(VaderModule_ProvideDatabaseFactory.java:0)at dagger.internal.DoubleCheck.get(DoubleCheck.java:47)at com.kuaishou.android.vader.persistent.LogRecordPersistor_Factory.get(LogRecordPersistor_Factory.java:0)at com.kuaishou.android.vader.persistent.LogRecordPersistor_Factory.get(LogRecordPersistor_Factory.java:0)at dagger.internal.DoubleCheck.get(DoubleCheck.java:47)at com.kuaishou.android.vader.assembler.Assembler_Factory.get(Assembler_Factory.java:0)at com.kuaishou.android.vader.assembler.Assembler_Factory.get(Assembler_Factory.java:0)at dagger.internal.DoubleCheck.get(DoubleCheck.java:47)at com.kuaishou.android.vader.dagger.DaggerVaderComponent.getAssembler(DaggerVaderComponent.java:0)at com.kuaishou.android.vader.Vader$1.run(Vader.java:9)at com.kuaishou.android.vader.concurrent.LogExceptionRunnable.run(LogExceptionRunnable.java:0)at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644)at com.kuaishou.android.vader.concurrent.NamedThreadFactory$RevisePriorityRunnable.run(NamedThreadFactory.java:2)at java.lang.Thread.run(Thread.java:1012)Caused by: java.lang.ClassNotFoundException: android.arch.persistence.room.RoomDatabase$JournalModeat com.kuaishou.android.vader.dagger.VaderModule.getSuggestedMode(VaderModule.java:0) at com.kuaishou.android.vader.dagger.VaderModule.provideDatabase(VaderModule.java:0) at com.kuaishou.android.vader.dagger.VaderModule_ProvideDatabaseFactory.provideDatabase(VaderModule_ProvideDatabaseFactory.java:0) at com.kuaishou.android.vader.dagger.VaderModule_ProvideDatabaseFactory.get(VaderModule_ProvideDatabaseFactory.java:0) at com.kuaishou.android.vader.dagger.VaderModule_ProvideDatabaseFactory.get(VaderModule_ProvideDatabaseFactory.java:0) at dagger.internal.DoubleCheck.get(DoubleCheck.java:47) at com.kuaishou.android.vader.persistent.LogRecordPersistor_Factory.get(LogRecordPersistor_Factory.java:0) at com.kuaishou.android.vader.persistent.LogRecordPersistor_Factory.get(LogRecordPersistor_Factory.java:0) at dagger.internal.DoubleCheck.get(DoubleCheck.java:47) at com.kuaishou.android.vader.assembler.Assembler_Factory.get(Assembler_Factory.java:0) at com.kuaishou.android.vader.assembler.Assembler_Factory.get(Assembler_Factory.java:0) at dagger.internal.DoubleCheck.get(DoubleCheck.java:47) at com.kuaishou.android.vader.dagger.DaggerVaderComponent.getAssembler(DaggerVaderComponent.java:0) at com.kuaishou.android.vader.Vader$1.run(Vader.java:9) at com.kuaishou.android.vader.concurrent.LogExceptionRunnable.run(LogExceptionRunnable.java:0) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644) at com.kuaishou.android.vader.concurrent.NamedThreadFactory$RevisePriorityRunnable.run(NamedThreadFactory.java:2) at java.lang.Thread.run(Thread.java:1012) 

需要导入下面的资源:
在这里插入图片描述

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com