Reputation: 3737
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:
I followed the Android Test Blueprint's sample to define the library versions in the top level / rootProject'S build.gradle file:
ext { minSdkVersion 16 }
And wanted to use it in the app's/module's build.gradle file:
minSdkVersion rootProject.ext.minSdkVersion
Upvotes: 3
Views: 1675
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