hb0
hb0

Reputation: 3737

Gradle: DSL method not found: minSdkVersion / targetSdkVersion / compileSdkVersion / buildToolsVersion

As it took me some time to find the solution for this error, I post my problem and solution here in the hope that I find it next time faster:

Error:(39, 0) Gradle DSL method not found: 'minSdkVersion()'

What I tried to do:

Upvotes: 3

Views: 1675

Answers (1)

hb0
hb0

Reputation: 3737

After half an hour or so I notices that this was a simple typo -.-

Solution

Add the "=" sign when you define a variable, else, Gradle thinks you call an Android method which it does not yet know in the top level build file:

ext { minSdkVersion = 16 }

Upvotes: 9

Related Questions