java - 错误 : Failed to resolve: androidx. annotation.annotation :1. 1.0:受影响的模块:app

标签 java android android-studio gradle build.gradle

我尝试添加这个包 androidx.annotation.annotation:1.1.0 来解决一些问题,但我明白了

错误:解析失败:androidx.annotation.annotation:1.1.0: 受影响的模块:app 这是我的 build.gradle

apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.jakewharton.hugo'
android {
    compileSdkVersion 29
    defaultConfig {
        applicationId "com.app.test"
        minSdkVersion 21
        targetSdkVersion 29
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}
dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'androidx.appcompat:appcompat:1.0.2'
    implementation 'com.google.android.material:material:1.0.0'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
    implementation 'androidx.lifecycle:lifecycle-extensions:2.1.0'
    implementation 'androidx.cardview:cardview:1.0.0'
    implementation 'androidx.recyclerview:recyclerview:1.0.0'
    implementation group: 'com.google.guava', name: 'guava', version: '26.0-android'
    implementation 'com.google.firebase:firebase-core:17.2.0'
    implementation 'com.google.firebase:firebase-messaging:20.0.0'
    implementation 'androidx.annotation.annotation:1.1.0'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test:runner:1.2.0'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
    implementation 'com.github.bumptech.glide:glide:4.8.0'
    implementation 'com.github.bumptech.glide:glide:4.8.0'
    annotationProcessor 'com.github.bumptech.glide:compiler:4.8.0'
    implementation 'com.squareup.retrofit2:retrofit:2.6.1'
    implementation 'com.squareup.retrofit2:converter-gson:2.6.1'
    implementation 'com.github.ittianyu:BottomNavigationViewEx:2.0.4'
    implementation 'com.anjlab.android.iab.v3:library:1.0.44'
    implementation 'com.github.ViksaaSkool:AwesomeSplash:v1.0.0'
    implementation 'com.jakewharton:butterknife:10.1.0'
}

我能做些什么来解决这个问题

最佳答案

androidx.annotation.annotation:1.1.0 不是正确的依赖声明。

正确的是

androidx.annotation:annotation:1.1.0

Link

关于java - 错误 : Failed to resolve: androidx. annotation.annotation :1. 1.0:受影响的模块:app,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58198304/

相关文章:

java - java中的交错 float 和字符串

android - 第一次安装 Android Studio - 报错

带有 Theme.AppCompat 的 Android 5.0 DatePicker

android - 非静态方法 putExtra 并且找不到符号方法

android - 如何使用 New Build System 在项目中添加 AAR 库?

Java 8 : Change the values of an EntrySet stream

java - 应该使用哪个 Twitter API 使用访问 token 而不是 user_id 或 screen_name 来获取用户基本信息?

java - Mysql导出报错

android - 如何让我的通知执行 onclick 操作?

android - Firestore 操作(add()、set())不起作用