我收到了gradle build错误:
Error: Cannot get property 'dirName' on null object
我在Gradle 1.3.1或更高版本中遇到此错误。
当我使用gradle版本1.2.3时,没有错误。
我谷歌这个错误,但无法找到任何解决方案。请帮忙!
我的项目gradle文件:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
maven { url "http://dl.bintray.com/populov/maven" }
mavenCentral()
jcenter()
flatDir { dirs '/usr/local/DexGuard6.1.19/lib' }
}
dependencies {
classpath 'com.android.tools.build:gradle:1.2.3'
classpath ':dexguard:'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
maven { url "http://dl.bintray.com/populov/maven" }
maven { url "https://repo.commonsware.com.s3.amazonaws.com" }
maven { url 'https://maven.fabric.io/public' }
maven { url "https://jitpack.io" }
mavenCentral()
jcenter()
}
}
答案 0 :(得分:1)
随着任务和内部的变化,Android Gradle插件仍在不断发展。您必须确保相应地更新DexGuard Gradle插件。