Closed turingking closed 8 years ago
Try
androidGroovy {
options {
configure(groovyOptions) {
encoding = 'UTF-8'
forkOptions.jvmArgs = ['-noverify'] // maybe necessary if you use Google Play Services
javaAnnotationProcessing = true
}
skipJavaC = true
}
}
@pieces029 In fact, I tried, but there is an error
FAILURE: Build failed with an exception.
* Where:
Build file 'E:\AndroidStudioProject\GroovyDemo\app\build.gradle' line: 50
* What went wrong:
A problem occurred configuring project ':app'.
> No such property: skipJavaC for class: org.gradle.api.tasks.compile.GroovyCompile_Decorated
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
in the line 50
androidGroovy {
options {
configure(groovyOptions) {
encoding = 'UTF-8'
forkOptions.jvmArgs = ['-noverify'] // maybe necessary if you use Google Play Services
javaAnnotationProcessing = true
}
skipJavaC = true //line 50
}
}
skipJavaC
isn't available until version 0.3.9, you are using 0.3.8.
Please see the sample here https://github.com/pieces029/groovy-android-data-binding
My module build.gradle
My MainAcativity
My layout
Error info