打包apk时碰到错误,解决办法在module:app的build.gradle文件中和dependencies{}平级的地方添加
tasks.configureEach { task ->
if (task.name.matches("\\w*compile\\w*Kotlin")) {
task.dependsOn('greendao')
}
if (task.name.matches("\\w*kaptGenerateStubs\\w*Kotlin")) {
task.dependsOn('greendao')
}
if (task.name.matches("\\w*kapt\\w*Kotlin")) {
task.dependsOn('greendao')
}
}
网友评论