11

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!

xxx
  • 1,153
  • 1
  • 11
  • 23
shane
  • 125
  • 1
  • 1
  • 9
  • if you're adding a reference to your code or anything else related to your question, please don't use a link to it – a_local_nobody May 04 '20 at 11:30
  • include the relevant part in your question, if it's code it's usually good to add it as text others can copy, otherwise an image will work fine. linking to an off-site resource won't help people in future if this link has been removed or is invalid – a_local_nobody May 04 '20 at 11:39

4 Answers4

23

Added this into gradle.properties files solve my problem.

android.useAndroidX=true
android.enableJetifier=true
tversteeg
  • 4,717
  • 10
  • 42
  • 77
linjiejun
  • 1,468
  • 15
  • 22
1

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"
}
xxx
  • 1,153
  • 1
  • 11
  • 23
1

Added this into gradle.properties files

android.useAndroidX=true
android.enableJetifier=true

if you did not find this file write in the terminal flutter create . to recreate your project after that you are going to see gradle.properties file with the same properties that I mintioned before.

Procrastinator
  • 2,526
  • 30
  • 27
  • 36
0

The gradle.properties file's name should be lowercase and you can place it multiple location, see the official documentation here. In this case, I guess you have to put it to your project root directory.

bvarga
  • 716
  • 6
  • 12