我尝试用最新的build.gradle(4.1)和android插件(3.0)构建我现有的代码,但它总是给我以下错误
错误:无法获取任务'的未知属性'resDir':类型为com.android.build.gradle.tasks.ProcessAndroidResources的6-MyApp:processReleaseResources。
我的应用程序gradle文件看起来像
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
resources.srcDirs = ['src']
aidl.srcDirs = ['src']
renderscript.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
jniLibs.srcDirs = ['libs']
}
androidTest {
//ignoreFailures = true
manifest.srcFile 'tests/AndroidManifest.xml'
java.srcDirs = ['tests/src']
resources.srcDirs = ['tests/src']
aidl.srcDirs = ['tests/src']
renderscript.srcDirs = ['tests/src']
res.srcDirs = ['tests/res']
assets.srcDirs = ['tests/assets']
jniLibs.srcDirs = ['libs']
}
debug.setRoot('build-types/debug')
release.setRoot('build-types/release')
}
deploy {
resourceCompressionLevel rootProject.ext.compressLevel
exportApk rootProject.ext.exportApk
exportMapping rootProject.ext.exportMapping
outputDir rootProject.ext.outputDir
}
非常感谢