所以,标题几乎总结了我的问题。谁知道怎么修它?上次我构建 apk 时,它在 AS 2.X 上运行良好,但是,我现在正在使用 Kotlin 进行开发,所以我必须使用 AS 3.0。
我使用 AS 3.0 Canary 7(这个项目是一个新项目)
这是我图书馆中的虚拟课程(存储在“domain”.library.mylibrary 中)
class Test {
fun hello(): String {
return "hello"
}
}
这是我的(mylibrary)gradle:
apply plugin: 'com.android.library'
android {
compileSdkVersion 26
buildToolsVersion "26.0.0"
defaultConfig {
minSdkVersion 19
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
implementation 'com.android.support:appcompat-v7:26.0.0-beta2'
testImplementation 'junit:junit:4.12'
implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version" //Declared in project level gradle: ext.kotlin_version = '1.1.3-2'
}
我的 gradlew.bat clean build --info 日志:https ://pastebin.com/bfTZ5s4e