Reputation: 61
I am trying to open my project in android studio SDK but, this groovy.lang.MissingPropertyException: Could not get unknown property 'KEY_ALIAS' for project ':app' of type org.gradle.api.Project. is ocuring. I don't know how to correct it. Please help.
I am using Android Studio 3.6.2
Here is my build/gradle
file -
buildscript {
repositories {
google()
jcenter()
maven {
url 'https://maven.fabric.io/public'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.3'
classpath 'com.google.gms:google-services:4.0.1'
classpath 'io.fabric.tools:gradle:1.25.4'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
ext {
supportLibraryVersion = '27.1.1'
constraintLayoutVersion = '1.1.2'
lifecycleVersion = "1.1.1"
butterKnifeVersion = '8.8.1'
glideVersion = '4.7.1'
timberVersion = '4.7.0'
gsonVersion = '2.8.2'
firebaseVersion = '16.0.1'
crashlyticsVersion = '2.9.4'
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Upvotes: 0
Views: 2196
Reputation: 791
There is two gradle file in android project
1) build.gradle (app level)
2) build.gradle (Project level)
the snippet which you posted is a build.gradle (project level). the problem lies in your build.gradle (app level).
open build.gradle from here
Open Project structure from your left top bar -> select android -> go to gradle script -> build.gradle
remove KEY_ALIAS from there.
Upvotes: 1