I've created a new AndroidStudio project using the libGDX generator. When I import the project into AndroidStudio using the build.gradle
file, I get a warning while editing build.gradle file
'sourceSets' cannot be applied to 'groovy.lang.closure'
Here is the section that gives the warning:
android {
buildToolsVersion "23.0.2"
compileSdkVersion 23
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
aidl.srcDirs = ['src']
renderscript.srcDirs = ['src']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
jniLibs.srcDirs = ['libs']
}
instrumentTest.setRoot('tests')
}
defaultConfig {
applicationId "com.twocrowstudios.rpggame"
minSdkVersion 9
targetSdkVersion 23
}
}
Just the sourceSets section is generating this error. What does this error mean? It seems that all my builds work fine. While there have been some other questions relating to the build section, this question pertains to the sourceSet section which has not been addressed.
There was long term bug IDEA-159224
which is still not completely fixed (as of 162.1628 build).
You can suppress this warning locally using comment //noinspection GroovyAssignabilityCheck
or turn off Incompatible type assignment
inspection (not recommended).
Anyway I'd suggest you to vote for this issue to attract developers attention to this problem.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With