【发布时间】:2017-07-21 05:40:52
【问题描述】:
所以,标题几乎概括了我的问题。谁知道怎么修它?上次我构建 apk,它在 AS 2.X 上运行良好,但是,我现在正在使用 Kotlin 进行开发,所以我必须使用 AS 3.0。
我用的是 AS 3.0 Canary 7(这个项目是新项目)
这是我图书馆中的虚拟类(存储在“域”.library.mylibrary 中)
class Test {
fun hello(): String {
return "hello"
}
}
这是我的(我的图书馆)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
【问题讨论】:
-
您的课程存储在哪里。发布整个路径(相对于您的项目)
-
请同时运行命令
./gradlew clean build --info并附加日志。 -
@guenhter 好的等等
-
@MosesAprico 还将依赖项中的
compile替换为implementation -
@guenhter gradlew.bat 完成后会自动关闭。如何保留?
标签: android kotlin aar android-studio-3.0