Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Could not set unknown property 'useAndroidX' for object of type com.android.build.gradle.internal.dsl.BaseAppModuleExtension

I want to add a library that i've found on github but it required androidx.I found out that i should put these:

android.useAndroidX=true
android.enableJetifier=true

here

defaultConfig {
    applicationId "com.kolydas.greeksinbrno"
    minSdkVersion 19
    targetSdkVersion 28
    versionCode 1
    versionName "1.0"
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    android.useAndroidX=true
    android.enableJetifier=true

}

But i got this error

Could not set unknown property 'useAndroidX' for object of type com.android.build.gradle.internal.dsl.BaseAppModuleExtension.

like image 531
Alex Kolydas Avatar asked Dec 19 '18 18:12

Alex Kolydas


1 Answers

Those two properties need to be defined in a gradle.properties file at the root of your project, not in your build.gradle.

like image 167
Kevin Coppock Avatar answered Oct 21 '22 12:10

Kevin Coppock