Every time I create a new Activity in AS 2.3 it messes up the build.gradle indentation that results in errors like this.
Error:Could not get unknown property 'compile' for object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
I have to redo the indentations every time. Any idea how to fix this permanently?
Don't use compile as a property and don't change the gradle structure.
Sometimes Gradle build messes up the code like above, it still happens. Probably related to Java JDK updates.
The problem seems to be caused by the lines which contain curly braces like:
In order to avoid the bug just put all the lines with curly braces above the "usual" (i.e.
compile 'something'
) lines like this: