Tester_at_work
Tester_at_work

Reputation: 99

UNable to implement androidx.appcompat.appcompat:1.0.0

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.

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

enter image description here

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

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.

Upvotes: 1

Views: 2059

Answers (1)

Gabriele Mariotti
Gabriele Mariotti

Reputation: 363707

Use

implementation 'androidx.appcompat:appcompat:1.0.0'

instead of

implementation androidx.appcompat:appcompat:1.0.0

Upvotes: 2

Related Questions