簡體   English   中英

“找不到 com.android.tools.build:gradle:2.2.0。” android 工作室中的錯誤

[英]“Could not find com.android.tools.build:gradle:2.2.0.” error in android studio

錯誤

導入從 web 下載的項目后,我開始收到此錯誤。

apply plugin: 'com.android.application'


android {
    compileSdkVersion 30
    buildToolsVersion "30.0.3"

    defaultConfig {
        applicationId "com.parse.starter"
        minSdkVersion 14
        targetSdkVersion 30
        versionCode 1
        versionName "1.0"
        multiDexEnabled true

        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.2.0'
    implementation 'com.google.android.material:material:1.2.1'
    implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
    implementation 'androidx.navigation:navigation-fragment:2.3.2'
    implementation 'androidx.navigation:navigation-ui:2.3.2'
    implementation 'androidx.multidex:multidex:2.0.1'

    implementation 'com.parse.bolts:bolts-tasks:1.4.0'
    implementation 'com.parse:parse-android:1.13.0'
    implementation 'com.google.android.gms:play-services:12.0.1'
    implementation 'com.google.jimfs:jimfs:1.1'
    implementation 'com.android.tools.build:gradle:2.2.0.'

    testImplementation 'junit:junit:4.13'
    androidTestImplementation 'androidx.test.ext:junit:1.1.2'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
}

看到這個答案后,我添加了上述文件

但我仍然收到錯誤消息。

我嘗試Inavalidate caches/restartclean and rebuild projectsync gradle

由於某種原因Add google Maven repository and sync project根本不起作用。 如果我點擊它,沒有任何反應。

能不能刪掉. 最后

  implementation 'com.android.tools.build:gradle:2.2.0.'

讓它

  implementation 'com.android.tools.build:gradle:2.2.0'

並嘗試它是否仍然相同

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM