【问题标题】:"Could not find com.android.tools.build:gradle:2.2.0." error in android studio“找不到 com.android.tools.build:gradle:2.2.0。” android工作室中的错误
【发布时间】:2023-03-20 06:59:02
【问题描述】:

error

我在导入从网上下载的项目后开始收到此错误。

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'
}

我看到answer后添加了上面的文件

但我仍然遇到错误。

我试过Inavalidate caches/restartclean and rebuild projectsync gradle

由于某种原因,Add google Maven repository and sync project 根本不起作用。如果我点击它,什么都不会发生。

【问题讨论】:

    标签: android maven android-studio parse-platform android-gradle-plugin


    【解决方案1】:

    能不能把末尾的.删掉

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

    实现它

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

    如果还是一样,试试看

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-11-23
      • 2016-10-26
      • 1970-01-01
      • 2017-08-21
      • 1970-01-01
      • 2020-03-27
      • 1970-01-01
      • 2021-05-04
      相关资源
      最近更新 更多