首页 > 解决方案 > Android Studio:无法解决:fragment-1.1.0

问题描述

我想在我的项目中添加一个名为 material 的库,但是当我尝试同步它时,它给了我标题中提到的错误。安卓工作室 4.0.1。

build.gradle(应用程序模块)

    apply plugin: 'com.android.application'

android {
    compileSdkVersion 30
    buildToolsVersion "30.0.1"

    defaultConfig {
        applicationId "com.example.app"
        minSdkVersion 14
        targetSdkVersion 30
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
}
  
dependencies {
    implementation fileTree(dir: "libs", include: ["*.jar"])
    implementation 'androidx.appcompat:appcompat:1.1.0'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'

    /*implemention for material shown below*/
    implementation 'com.google.android.material:material:1.3.0-alpha02'

    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test.ext:junit:1.1.1'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'


}

标签: androidandroid-studio

解决方案


推荐阅读