Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

'android.useAndroidX' property is not enabled

okay, so this is the first time I'm working with SDKs,

I'm using the zoom SDK from here https://marketplace.zoom.us/docs/sdk/native-sdks/android/getting-started

and I'm trying to run the sample APK as mentioned in the documentation and it returns the error "This project uses AndroidX dependencies, but the 'android.useAndroidX' property is not enabled" https://i.stack.imgur.com/taM6c.png

and I have searched and found a solution to this where I turn the android project into an androidX project by using the following in the Gradle.properties file:

android.useAndroidX=true
android.enableJetifier=true

HERE IS WHERE THE ISSUE LIES

the SDK doesn't have any Gradle.properties file, and hence i don't know where to insert the above code for now, I have inserted the above code in the following files: https://i.stack.imgur.com/Ktj4j.png

and yet the issue still exists, can I please get some help on this? thanks in advance!

like image 534
shane Avatar asked Dec 22 '22 18:12

shane


2 Answers

Added this into gradle.properties files solve my problem.

android.useAndroidX=true
android.enableJetifier=true
like image 55
linjiejun Avatar answered Dec 31 '22 13:12

linjiejun


Create new project that time no need to convert AndroidX. Add this in gradle, hopefully working.

Application level

dependencies {
    
       implementation fileTree(dir: 'libs', include: ['*.aar', '*.jar'], exclude: [])
       implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
       implementation 'androidx.core:core-ktx:1.3.1'             
       implementation files('libs/commonlib.aar')
       implementation files('libs/mobilertc.aar')
       testImplementation 'junit:junit:4.12'
       androidTestImplementation 'androidx.test.ext:junit:1.1.1'
       androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
       implementation 'androidx.multidex:multidex:2.0.1'
       implementation 'androidx.recyclerview:recyclerview:1.1.0'
       implementation 'androidx.appcompat:appcompat:1.2.0'
       implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
       implementation 'com.google.android.material:material:1.3.0-alpha02'     
}

Project Level

dependencies {
     classpath "com.android.tools.build:gradle:4.0.0"
     classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
like image 40
Fazle Rabbi Avatar answered Dec 31 '22 12:12

Fazle Rabbi