Reputation: 1
I am facing this issue
Could not find method buildTypes() for arguments [build_3r52yusiev35zn4cvwce7kc4y$_run_closure1$_closure3@16d58fc] on root project 'testapp' of type org.gradle.api.Project. Open File
Upvotes: 0
Views: 1198
Reputation: 29783
Could not find method buildTypes()
That's because you have incorrectly placed the buildTypes
inside your build.gradle
. It must be inside your android
block in your module build.gradle
. Something like this:
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
buildToolsVersion "29.0.0"
defaultConfig {
// your app config
...
}
// your buildTypes here. It's must be inside the android block
buildTypes {
...
}
}
dependencies {
// your dependencies.
...
}
You need to consult The module-level build file documentation for details.
Your current build.gradle
picture is looks like the root build.gradle
of your project. Visit The top-level build file for details about it.
Upvotes: 1