无法实现androidx.appcompat.appcompat:1.0.0 [英] UNable to implement androidx.appcompat.appcompat:1.0.0

查看:1526
本文介绍了无法实现androidx.appcompat.appcompat:1.0.0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我绝对是Android开发的初学者,并且尝试构建测试自动化来测试移动应用程序.经过数周的设置IntelliJ设置后,我仍然面临问题,其中有以下问题.

I am an absolute beginner in Android development and trying to build test automation to test mobile apps. After going through weeks of setting up IntelliJ, I am still facing issues and among them is the following.

当我使用SDK版本29时,被告知应按以下方式将所有"support"关键字转换为androidx的格式:

As I am using SDK ver 29, I was told that I should convert all "support" keyword to androidx's format as per below:

因此,当我应用它时,我在"1.0.0"末尾有一条红色的线条,表示错误,如下所示

SO, when I applied it, I am having the red sqiuggly line indicating error at the end of the "1.0.0" as shown below

以下是我的app/build.gradle

The following is my app/build.gradle

android {
    compileSdkVersion 29
    buildToolsVersion "29.0.1"
    defaultConfig {
        applicationId "com.example.test"
        minSdkVersion 15
        targetSdkVersion 29
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {

    implementation fileTree(dir: 'libs', include: ['*.jar'])
    //noinspection GradleCompatible
    //implementation 'com.android.support:appcompat-v7:29+'
    implementation androidx.appcompat.appcompat:1.0.0
    //implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    testImplementation 'junit:junit:4.12'
    implementation 'androidx.annotation:annotation:1.1.0'
    //androidTestImplementation 'com.android.support.test:runner:1.0.2'
    //androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
    //androidTestImplementation 'com.android.support:support-annotations:24.0.0'
    //implementation("com.android.support:support-v4:27.1.1")
    //implementation project(':react-native-fast-image')

}
if(hasProperty('buildScan')){
    buildScan {
        termsOfServiceUrl = 'https://gradle.com/terms-of-service';
        termsOfServiceAgree = 'yes'
    }
}

希望就我做错了什么事情和在哪里做事提供咨询.

Hope to have advice on what and where I have done wrong.

推荐答案

使用

implementation 'androidx.appcompat:appcompat:1.0.0'

代替

implementation androidx.appcompat:appcompat:1.0.0

这篇关于无法实现androidx.appcompat.appcompat:1.0.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆