我在Kotlin开发了一个Android库模块 – 在Kotlin项目上进行了测试,一切正常.使用gradle的maven-publishing插件,我生成了aar文件并将它们上传到Maven服务器上,所以后来我使用compile’group:artifact:version’在AndroID Java Application上添加了lib.
库文件似乎被识别,但是,当我尝试启动lib上存在的活动时,我得到以下堆栈跟踪:
05-12 14:21:48.221 11735-11735/*****.*****.dev W/art: Unable to resolve Lbr/com/**********/dataform/renderengine/core/model/DataCollector; annotation class 18205-12 14:21:48.222 11735-11735/*****.*****.dev W/art: Unable to resolve Lbr/com/**********/dataform/renderengine/core/model/DataCollector; annotation class 18105-12 14:21:48.222 11735-11735/*****.*****.dev W/art: Unable to resolve Lbr/com/**********/dataform/renderengine/core/model/DataCollector; annotation class 18105-12 14:21:48.223 11735-11735/*****.*****.dev W/art: Unable to resolve Lbr/com/**********/dataform/renderengine/core/model/Collect; annotation class 18205-12 14:21:48.224 11735-11735/*****.*****.dev W/art: Unable to resolve Lbr/com/**********/dataform/renderengine/core/model/Collect; annotation class 18005-12 14:21:48.224 11735-11735/*****.*****.dev W/art: Unable to resolve Lbr/com/**********/dataform/renderengine/core/model/Collect; annotation class 18005-12 14:21:48.224 11735-11735/*****.*****.dev W/art: Unable to resolve Lbr/com/**********/dataform/renderengine/core/model/Collect; annotation class 17905-12 14:21:48.225 11735-11735/*****.*****.dev W/art: Unable to resolve Lbr/com/**********/dataform/renderengine/core/model/Collect; annotation class 17905-12 14:21:48.225 11735-11735/*****.*****.dev W/art: Unable to resolve Lbr/com/**********/dataform/renderengine/core/model/Collect; annotation class 18005-12 14:21:48.225 11735-11735/*****.*****.dev W/art: Unable to resolve Lbr/com/**********/dataform/renderengine/core/model/Collect; annotation class 18005-12 14:21:48.225 11735-11735/*****.*****.dev W/art: Unable to resolve Lbr/com/**********/dataform/renderengine/core/model/Collect; annotation class 17905-12 14:21:48.226 11735-11735/*****.*****.dev W/art: Unable to resolve Lbr/com/**********/dataform/renderengine/core/model/Collect; annotation class 17905-12 14:21:48.226 11735-11735/*****.*****.dev W/art: Unable to resolve Lbr/com/**********/dataform/renderengine/core/model/DataCollector; annotation class 18005-12 14:21:48.227 11735-11735/*****.*****.dev W/art: Unable to resolve Lbr/com/**********/dataform/renderengine/core/model/DataCollector; annotation class 18005-12 14:21:48.227 11735-11735/*****.*****.dev W/art: Unable to resolve Lbr/com/**********/dataform/renderengine/core/model/DataCollector; annotation class 17905-12 14:21:48.227 11735-11735/*****.*****.dev W/art: Unable to resolve Lbr/com/**********/dataform/renderengine/core/model/DataCollector; annotation class 17905-12 14:21:48.227 11735-11735/*****.*****.dev W/art: Unable to resolve Lbr/com/**********/dataform/renderengine/core/model/DataCollector; annotation class 18005-12 14:21:48.228 11735-11735/*****.*****.dev W/art: Unable to resolve Lbr/com/**********/dataform/renderengine/core/model/DataCollector; annotation class 18005-12 14:21:48.228 11735-11735/*****.*****.dev W/art: Unable to resolve Lbr/com/**********/dataform/renderengine/core/model/DataCollector; annotation class 17905-12 14:21:48.228 11735-11735/*****.*****.dev W/art: Unable to resolve Lbr/com/**********/dataform/renderengine/core/model/DataCollector; annotation class 17905-12 14:21:48.229 11735-11735/*****.*****.dev W/art: Unable to resolve Lbr/com/**********/dataform/renderengine/core/model/DataCollector; annotation class 17905-12 14:21:48.229 11735-11735/*****.*****.dev W/art: Unable to resolve Lbr/com/**********/dataform/renderengine/core/model/DataCollector; annotation class 17905-12 14:21:48.230 11735-11735/*****.*****.dev W/art: Unable to resolve Lbr/com/**********/dataform/renderengine/core/model/Feedback; annotation class 18205-12 14:21:48.232 11735-11735/*****.*****.dev W/art: Unable to resolve Lbr/com/**********/dataform/renderengine/core/model/Feedback; annotation class 18105-12 14:21:48.232 11735-11735/*****.*****.dev W/art: Unable to resolve Lbr/com/**********/dataform/renderengine/core/model/Feedback; annotation class 18105-12 14:21:48.233 11735-11735/*****.*****.dev W/art: Unable to resolve Lbr/com/**********/dataform/renderengine/core/model/Entry; annotation class 18205-12 14:21:48.233 11735-11735/*****.*****.dev W/art: Unable to resolve Lbr/com/**********/dataform/renderengine/core/model/Entry; annotation class 18005-12 14:21:48.234 11735-11735/*****.*****.dev W/art: Unable to resolve Lbr/com/**********/dataform/renderengine/core/model/Entry; annotation class 18005-12 14:21:48.234 11735-11735/*****.*****.dev W/art: Unable to resolve Lbr/com/**********/dataform/renderengine/core/model/Entry; annotation class 18005-12 14:21:48.234 11735-11735/*****.*****.dev W/art: Unable to resolve Lbr/com/**********/dataform/renderengine/core/model/Entry; annotation class 18005-12 14:21:48.235 11735-11735/*****.*****.dev W/art: Unable to resolve Lbr/com/**********/dataform/renderengine/core/model/Feedback; annotation class 17905-12 14:21:48.235 11735-11735/*****.*****.dev W/art: Unable to resolve Lbr/com/**********/dataform/renderengine/core/model/Feedback; annotation class 17905-12 14:21:48.272 11735-11735/*****.*****.dev I/art: Rejecting re-init on prevIoUsly-Failed class java.lang.class<br.com.**********.dataform.renderengine.presentation.Feedback.PIEChartFeedback>: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/github/mikephil/charting/charts/PIEChart;05-12 14:21:48.273 11735-11735/*****.*****.dev I/art: at java.lang.Object java.lang.class.newInstance!() (Class.java:-2)05-12 14:21:48.273 11735-11735/*****.*****.dev I/art: at androID.app.Activity androID.app.Instrumentation.newActivity(java.lang.classLoader, java.lang.String, androID.content.Intent) (Instrumentation.java:1078)05-12 14:21:48.273 11735-11735/*****.*****.dev I/art: at androID.app.Activity androID.app.ActivityThread.performlaunchActivity(androID.app.ActivityThread$ActivityClIEntRecord, androID.content.Intent) (ActivityThread.java:2557)05-12 14:21:48.273 11735-11735/*****.*****.dev I/art: at voID androID.app.ActivityThread.handleLaunchActivity(androID.app.ActivityThread$ActivityClIEntRecord, androID.content.Intent, java.lang.String) (ActivityThread.java:2726)05-12 14:21:48.273 11735-11735/*****.*****.dev I/art: at voID androID.app.ActivityThread.-wrap12(androID.app.ActivityThread, androID.app.ActivityThread$ActivityClIEntRecord, androID.content.Intent, java.lang.String) (ActivityThread.java:-1)05-12 14:21:48.273 11735-11735/*****.*****.dev I/art: at voID androID.app.ActivityThread$H.handleMessage(androID.os.Message) (ActivityThread.java:1477)05-12 14:21:48.273 11735-11735/*****.*****.dev I/art: at voID androID.os.Handler.dispatchMessage(androID.os.Message) (Handler.java:102)05-12 14:21:48.273 11735-11735/*****.*****.dev I/art: at voID androID.os.Looper.loop() (Looper.java:154)05-12 14:21:48.273 11735-11735/*****.*****.dev I/art: at voID androID.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:6119)05-12 14:21:48.273 11735-11735/*****.*****.dev I/art: at java.lang.Object java.lang.reflect.Method.invoke!(java.lang.Object, java.lang.Object[]) (Method.java:-2)05-12 14:21:48.273 11735-11735/*****.*****.dev I/art: at voID com.androID.internal.os.ZygoteInit$MethodAndArgsCaller.run() (ZygoteInit.java:886)05-12 14:21:48.273 11735-11735/*****.*****.dev I/art: at voID com.androID.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:776)05-12 14:21:48.273 11735-11735/*****.*****.dev I/art: Caused by: java.lang.classNotFoundException: DIDn't find class "com.github.mikephil.charting.charts.PIEChart" on path: DexPathList[[zip file "/data/app/*****.*****.dev-2/base.apk", zip file "/data/app/*****.*****.dev-2/split_lib_dependencIEs_apk.apk", zip file "/data/app/*****.*****.dev-2/split_lib_slice_0_apk.apk", zip file "/data/app/*****.*****.dev-2/split_lib_slice_1_apk.apk", zip file "/data/app/*****.*****.dev-2/split_lib_slice_2_apk.apk", zip file "/data/app/*****.*****.dev-2/split_lib_slice_3_apk.apk", zip file "/data/app/*****.*****.dev-2/split_lib_slice_4_apk.apk", zip file "/data/app/*****.*****.dev-2/split_lib_slice_5_apk.apk", zip file "/data/app/*****.*****.dev-2/split_lib_slice_6_apk.apk", zip file "/data/app/*****.*****.dev-2/split_lib_slice_7_apk.apk", zip file "/data/app/*****.*****.dev-2/split_lib_slice_8_apk.apk", zip file "/data/app/*****.*****.dev-2/split_lib_slice_9_apk.apk"],nativelibraryDirectorIEs=[/data/app/*****.*****.dev-2/lib/x86, /system/lib, /vendor/lib]]05-12 14:21:48.273 11735-11735/*****.*****.dev I/art: at java.lang.class dalvik.system.BaseDexClassLoader.findClass(java.lang.String) (BaseDexClassLoader.java:56)05-12 14:21:48.273 11735-11735/*****.*****.dev I/art: at java.lang.class java.lang.classLoader.loadClass(java.lang.String, boolean) (ClassLoader.java:380)05-12 14:21:48.273 11735-11735/*****.*****.dev I/art: at java.lang.class java.lang.classLoader.loadClass(java.lang.String) (ClassLoader.java:312)05-12 14:21:48.273 11735-11735/*****.*****.dev I/art: at java.lang.Object java.lang.class.newInstance!() (Class.java:-2)05-12 14:21:48.273 11735-11735/*****.*****.dev I/art: at androID.app.Activity androID.app.Instrumentation.newActivity(java.lang.classLoader, java.lang.String, androID.content.Intent) (Instrumentation.java:1078)05-12 14:21:48.273 11735-11735/*****.*****.dev I/art: at androID.app.Activity androID.app.ActivityThread.performlaunchActivity(androID.app.ActivityThread$ActivityClIEntRecord, androID.content.Intent) (ActivityThread.java:2557)05-12 14:21:48.273 11735-11735/*****.*****.dev I/art: at voID androID.app.ActivityThread.handleLaunchActivity(androID.app.ActivityThread$ActivityClIEntRecord, androID.content.Intent, java.lang.String) (ActivityThread.java:2726)05-12 14:21:48.273 11735-11735/*****.*****.dev I/art: at voID androID.app.ActivityThread.-wrap12(androID.app.ActivityThread, androID.app.ActivityThread$ActivityClIEntRecord, androID.content.Intent, java.lang.String) (ActivityThread.java:-1)05-12 14:21:48.273 11735-11735/*****.*****.dev I/art: at voID androID.app.ActivityThread$H.handleMessage(androID.os.Message) (ActivityThread.java:1477)05-12 14:21:48.273 11735-11735/*****.*****.dev I/art: at voID androID.os.Handler.dispatchMessage(androID.os.Message) (Handler.java:102)05-12 14:21:48.273 11735-11735/*****.*****.dev I/art: at voID androID.os.Looper.loop() (Looper.java:154)05-12 14:21:48.273 11735-11735/*****.*****.dev I/art: at voID androID.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:6119)05-12 14:21:48.273 11735-11735/*****.*****.dev I/art: at java.lang.Object java.lang.reflect.Method.invoke!(java.lang.Object, java.lang.Object[]) (Method.java:-2)05-12 14:21:48.273 11735-11735/*****.*****.dev I/art: at voID com.androID.internal.os.ZygoteInit$MethodAndArgsCaller.run() (ZygoteInit.java:886)05-12 14:21:48.273 11735-11735/*****.*****.dev I/art: at voID com.androID.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:776)05-12 14:21:48.275 11735-11735/*****.*****.dev I/art: Rejecting re-init on prevIoUsly-Failed class java.lang.class<br.com.**********.dataform.renderengine.presentation.FormActivity$assembleWizard>: java.lang.NoClassDefFoundError: Failed resolution of: Lkotlin/jvm/internal/Lambda;05-12 14:21:48.275 11735-11735/*****.*****.dev I/art: at java.lang.Object java.lang.class.newInstance!() (Class.java:-2)05-12 14:21:48.275 11735-11735/*****.*****.dev I/art: at androID.app.Activity androID.app.Instrumentation.newActivity(java.lang.classLoader, java.lang.String, androID.content.Intent) (Instrumentation.java:1078)05-12 14:21:48.275 11735-11735/*****.*****.dev I/art: at androID.app.Activity androID.app.ActivityThread.performlaunchActivity(androID.app.ActivityThread$ActivityClIEntRecord, androID.content.Intent) (ActivityThread.java:2557)05-12 14:21:48.275 11735-11735/*****.*****.dev I/art: at voID androID.app.ActivityThread.handleLaunchActivity(androID.app.ActivityThread$ActivityClIEntRecord, androID.content.Intent, java.lang.String) (ActivityThread.java:2726)05-12 14:21:48.275 11735-11735/*****.*****.dev I/art: at voID androID.app.ActivityThread.-wrap12(androID.app.ActivityThread, androID.app.ActivityThread$ActivityClIEntRecord, androID.content.Intent, java.lang.String) (ActivityThread.java:-1)05-12 14:21:48.276 11735-11735/*****.*****.dev I/art: at voID androID.app.ActivityThread$H.handleMessage(androID.os.Message) (ActivityThread.java:1477)05-12 14:21:48.276 11735-11735/*****.*****.dev I/art: at voID androID.os.Handler.dispatchMessage(androID.os.Message) (Handler.java:102)05-12 14:21:48.276 11735-11735/*****.*****.dev I/art: at voID androID.os.Looper.loop() (Looper.java:154)05-12 14:21:48.276 11735-11735/*****.*****.dev I/art: at voID androID.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:6119)05-12 14:21:48.276 11735-11735/*****.*****.dev I/art: at java.lang.Object java.lang.reflect.Method.invoke!(java.lang.Object, java.lang.Object[]) (Method.java:-2)05-12 14:21:48.276 11735-11735/*****.*****.dev I/art: at voID com.androID.internal.os.ZygoteInit$MethodAndArgsCaller.run() (ZygoteInit.java:886)05-12 14:21:48.276 11735-11735/*****.*****.dev I/art: at voID com.androID.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:776)05-12 14:21:48.276 11735-11735/*****.*****.dev I/art: Caused by: java.lang.classNotFoundException: DIDn't find class "kotlin.jvm.internal.Lambda" on path: DexPathList[[zip file "/data/app/*****.*****.dev-2/base.apk", zip file "/data/app/*****.*****.dev-2/split_lib_dependencIEs_apk.apk", zip file "/data/app/*****.*****.dev-2/split_lib_slice_0_apk.apk", zip file "/data/app/*****.*****.dev-2/split_lib_slice_1_apk.apk", zip file "/data/app/*****.*****.dev-2/split_lib_slice_2_apk.apk", zip file "/data/app/*****.*****.dev-2/split_lib_slice_3_apk.apk", zip file "/data/app/*****.*****.dev-2/split_lib_slice_4_apk.apk", zip file "/data/app/*****.*****.dev-2/split_lib_slice_5_apk.apk", zip file "/data/app/*****.*****.dev-2/split_lib_slice_6_apk.apk", zip file "/data/app/*****.*****.dev-2/split_lib_slice_7_apk.apk", zip file "/data/app/*****.*****.dev-2/split_lib_slice_8_apk.apk", zip file "/data/app/*****.*****.dev-2/split_lib_slice_9_apk.apk"],nativelibraryDirectorIEs=[/data/app/*****.*****.dev-2/lib/x86, /system/lib, /vendor/lib]]05-12 14:21:48.276 11735-11735/*****.*****.dev I/art: at java.lang.class dalvik.system.BaseDexClassLoader.findClass(java.lang.String) (BaseDexClassLoader.java:56)05-12 14:21:48.276 11735-11735/*****.*****.dev I/art: at java.lang.class java.lang.classLoader.loadClass(java.lang.String, boolean) (ClassLoader.java:380)05-12 14:21:48.276 11735-11735/*****.*****.dev I/art: at java.lang.class java.lang.classLoader.loadClass(java.lang.String) (ClassLoader.java:312)05-12 14:21:48.276 11735-11735/*****.*****.dev I/art: at java.lang.Object java.lang.class.newInstance!() (Class.java:-2)05-12 14:21:48.276 11735-11735/*****.*****.dev I/art: at androID.app.Activity androID.app.Instrumentation.newActivity(java.lang.classLoader, java.lang.String, androID.content.Intent) (Instrumentation.java:1078)05-12 14:21:48.276 11735-11735/*****.*****.dev I/art: at androID.app.Activity androID.app.ActivityThread.performlaunchActivity(androID.app.ActivityThread$ActivityClIEntRecord, androID.content.Intent) (ActivityThread.java:2557)05-12 14:21:48.276 11735-11735/*****.*****.dev I/art: at voID androID.app.ActivityThread.handleLaunchActivity(androID.app.ActivityThread$ActivityClIEntRecord, androID.content.Intent, java.lang.String) (ActivityThread.java:2726)05-12 14:21:48.276 11735-11735/*****.*****.dev I/art: at voID androID.app.ActivityThread.-wrap12(androID.app.ActivityThread, androID.app.ActivityThread$ActivityClIEntRecord, androID.content.Intent, java.lang.String) (ActivityThread.java:-1)05-12 14:21:48.276 11735-11735/*****.*****.dev I/art: at voID androID.app.ActivityThread$H.handleMessage(androID.os.Message) (ActivityThread.java:1477)05-12 14:21:48.276 11735-11735/*****.*****.dev I/art: at voID androID.os.Handler.dispatchMessage(androID.os.Message) (Handler.java:102)05-12 14:21:48.276 11735-11735/*****.*****.dev I/art: at voID androID.os.Looper.loop() (Looper.java:154)05-12 14:21:48.276 11735-11735/*****.*****.dev I/art: at voID androID.app.ActivityThread.main(java.lang.String[]) (ActivityThread.java:6119)05-12 14:21:48.276 11735-11735/*****.*****.dev I/art: at java.lang.Object java.lang.reflect.Method.invoke!(java.lang.Object, java.lang.Object[]) (Method.java:-2)05-12 14:21:48.276 11735-11735/*****.*****.dev I/art: at voID com.androID.internal.os.ZygoteInit$MethodAndArgsCaller.run() (ZygoteInit.java:886)05-12 14:21:48.276 11735-11735/*****.*****.dev I/art: at voID com.androID.internal.os.ZygoteInit.main(java.lang.String[]) (ZygoteInit.java:776)05-12 14:21:48.482 11735-11735/*****.*****.dev E/AndroIDRuntime: FATAL EXCEPTION: main Process: *****.*****.dev, PID: 11735 java.lang.NoClassDefFoundError: Failed resolution of: Lkotlin/jvm/internal/Intrinsics; at br.com.**********.dataform.renderengine.presentation.FormActivity.assembleWizard(FormActivity.kt:117) at br.com.**********.dataform.renderengine.presentation.FormActivity.onCreate(FormActivity.kt:71) at androID.app.Activity.performCreate(Activity.java:6679) at androID.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118) at androID.app.ActivityThread.performlaunchActivity(ActivityThread.java:2618) at androID.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2726) at androID.app.ActivityThread.-wrap12(ActivityThread.java) at androID.app.ActivityThread$H.handleMessage(ActivityThread.java:1477) at androID.os.Handler.dispatchMessage(Handler.java:102) at androID.os.Looper.loop(Looper.java:154) at androID.app.ActivityThread.main(ActivityThread.java:6119) at java.lang.reflect.Method.invoke(Native Method) at com.androID.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886) at com.androID.internal.os.ZygoteInit.main(ZygoteInit.java:776) Caused by: java.lang.classNotFoundException: DIDn't find class "kotlin.jvm.internal.Intrinsics" on path: DexPathList[[zip file "/data/app/*****.*****.dev-2/base.apk", zip file "/data/app/*****.*****.dev-2/split_lib_dependencIEs_apk.apk", zip file "/data/app/*****.*****.dev-2/split_lib_slice_0_apk.apk", zip file "/data/app/*****.*****.dev-2/split_lib_slice_1_apk.apk", zip file "/data/app/*****.*****.dev-2/split_lib_slice_2_apk.apk", zip file "/data/app/*****.*****.dev-2/split_lib_slice_3_apk.apk", zip file "/data/app/*****.*****.dev-2/split_lib_slice_4_apk.apk", zip file "/data/app/*****.*****.dev-2/split_lib_slice_5_apk.apk", zip file "/data/app/*****.*****.dev-2/split_lib_slice_6_apk.apk", zip file "/data/app/*****.*****.dev-2/split_lib_slice_7_apk.apk", zip file "/data/app/*****.*****.dev-2/split_lib_slice_8_apk.apk", zip file "/data/app/*****.*****.dev-2/split_lib_slice_9_apk.apk"],nativelibraryDirectorIEs=[/data/app/*****.*****.dev-2/lib/x86, /system/lib, /vendor/lib]] at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56) at java.lang.classLoader.loadClass(ClassLoader.java:380) at java.lang.classLoader.loadClass(ClassLoader.java:312) at br.com.**********.dataform.renderengine.presentation.FormActivity.assembleWizard(FormActivity.kt:117) at br.com.**********.dataform.renderengine.presentation.FormActivity.onCreate(FormActivity.kt:71) at androID.app.Activity.performCreate(Activity.java:6679) at androID.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118) at androID.app.ActivityThread.performlaunchActivity(ActivityThread.java:2618) at androID.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2726) at androID.app.ActivityThread.-wrap12(ActivityThread.java) at androID.app.ActivityThread$H.handleMessage(ActivityThread.java:1477) at androID.os.Handler.dispatchMessage(Handler.java:102) at androID.os.Looper.loop(Looper.java:154) at androID.app.ActivityThread.main(ActivityThread.java:6119) at java.lang.reflect.Method.invoke(Native Method) at com.androID.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886) at com.androID.internal.os.ZygoteInit.main(ZygoteInit.java:776)
这是我的模块的build.gradle:
apply plugin: 'com.androID.library'apply plugin: 'kotlin-androID'apply plugin: 'kotlin-android-extensions'apply from : 'publish.gradle'androID { compileSdkVersion 25 buildToolsversion "25.0.3" defaultConfig { minSdkVersion 14 targetSdkVersion 25 versionCode 1 versionname libVersion testInstrumentationRunner "androID.support.test.runner.AndroIDJUnitRunner" } buildTypes { release { MinifyEnabled false proguardfiles getDefaultProguardfile('proguard-androID.txt'), 'proguard-rules.pro' } } sourceSets { main.java.srcDirs += 'src/main/kotlin' } lintoptions { abortOnError false }}dependencIEs { // TEST compile filetree(dir: 'libs', include: ['*.jar']) androIDTestCompile('com.androID.support.test.espresso:espresso-core:2.2.2', { exclude group: 'com.androID.support', module: 'support-annotations' }) compile 'com.androID.support:appcompat-v7:25.3.1' testCompile 'junit:junit:4.12' // Google compile 'com.Google.code.gson:gson:2.8.0' compile "com.androID.support:appcompat-v7:$appcompat" compile "com.androID.support:cardvIEw-v7:$appcompat" compile "com.androID.support:design:$appcompat" // OTHER compile('org.simpleframework:simple-xml:2.7.+') { exclude module: 'stax' exclude module: 'stax-API' exclude module: 'xpp3' } compile 'com.github.PhilJay:MPAndroIDChart:v3.0.2' compile 'org.apache.commons:commons-io:1.3.2' // RX ANDROID compile 'io.reactivex.rxjava2:rxandroID:2.0.1' compile 'io.reactivex.rxjava2:rxjava:2.0.1' // KOTliN compile "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version" // ANKO compile "org.jetbrains.anko:anko-common:$anko_version" compile "org.jetbrains.anko:anko-sdk15:$anko_version" compile "org.jetbrains.anko:anko-support-v4:$anko_version" compile "org.jetbrains.anko:anko-appcompat-v7:$anko_version"}buildscript { repositorIEs { jcenter() } dependencIEs { classpath "org.jetbrains.kotlin:kotlin-android-extensions:$kotlin_version" }}kapt { generateStubs = true}
解决方法:
kotlin-stdlib-jre7工件不适用于AndroID,AndroID目前仅支持Java 6平台.在定位AndroID时,您应该使用为JRE 6构建的kotlin-stdlib:
// KOTliNcompile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
总结 以上是内存溢出为你收集整理的在Kotlin中开发的Android库模块导出到Java Application导致失败的解决方案:Lkotlin / jvm / internal / Intrinsics全部内容,希望文章能够帮你解决在Kotlin中开发的Android库模块导出到Java Application导致失败的解决方案:Lkotlin / jvm / internal / Intrinsics所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)