Java ';android.useAndroidX';属性未启用

Java ';android.useAndroidX';属性未启用,java,android,androidx,zoom-sdk,Java,Android,Androidx,Zoom Sdk,好吧,这是我第一次与SDK合作 我在这里使用zoom SDK,SDK/android/getting started 我尝试运行文档中提到的示例apk,它返回错误 此项目使用AndroidX依赖项,但未启用“android.useAndroidX”属性 我在Gradle.properties文件中使用以下内容搜索并找到了解决方案,将android项目转化为androidX项目: android.useAndroidX=true android.enableJetifier=tru

好吧,这是我第一次与SDK合作

我在这里使用zoom SDK,SDK/android/getting started

我尝试运行文档中提到的示例apk,它返回错误 此项目使用AndroidX依赖项,但未启用“android.useAndroidX”属性

我在Gradle.properties文件中使用以下内容搜索并找到了解决方案,将android项目转化为androidX项目:

   android.useAndroidX=true
    android.enableJetifier=true
问题就在这里

SDK没有任何Gradle.properties文件,因此我不知道在哪里插入上述代码 目前,我已在以下文件中插入了上述代码:


但是这个问题仍然存在,我能在这方面得到一些帮助吗?提前谢谢

gradle.properties文件名应为小写,您可以将其放置在多个位置,请参阅官方文档。 在这种情况下,我想您必须将它放在项目根目录中

 Create new project that time no need to convert AndroidX. Add this in gradle, hopefully working.
应用程序级别

 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'
    
    }
 dependencies {
        classpath "com.android.tools.build:gradle:4.0.0"
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }
项目级

 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'
    
    }
 dependencies {
        classpath "com.android.tools.build:gradle:4.0.0"
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }

将此添加到
gradle.properties
文件解决了我的问题

android.useAndroidX=true
android.enableJetifier=true

如果您要添加代码引用或与问题相关的任何其他内容,请不要使用链接,包括问题中的相关部分,如果是代码,通常最好将其添加为其他人可以复制的文本,否则图像可以正常工作。如果此链接已被删除或无效,则链接到非现场资源对将来的用户不会有帮助。请解释您的回答我创建一个新项目并将其添加到Gradle文件中。在那之后,它工作得很顺利。谢谢