找不到com.android.tools.build:aapt2:3.3.0-alpha08-4963834。我收到此错误

时间:2018-09-04 20:15:44

标签: android android-things

Searched in the following locations:
  - file:/C:/Users/3D Electronics/AppData/Local/Android/Sdk/extras/m2repository/com/android/tools/build/aapt2/3.3.0-alpha08-4963834/aapt2-3.3.0-alpha08-4963834.pom
  - file:/C:/Users/3D Electronics/AppData/Local/Android/Sdk/extras/m2repository/com/android/tools/build/aapt2/3.3.0-alpha08-4963834/aapt2-3.3.0-alpha08-4963834-windows.jar
  - file:/C:/Users/3D Electronics/AppData/Local/Android/Sdk/extras/google/m2repository/com/android/tools/build/aapt2/3.3.0-alpha08-4963834/aapt2-3.3.0-alpha08-4963834.pom
  - file:/C:/Users/3D Electronics/AppData/Local/Android/Sdk/extras/google/m2repository/com/android/tools/build/aapt2/3.3.0-alpha08-4963834/aapt2-3.3.0-alpha08-4963834-windows.jar
  - file:/C:/Users/3D Electronics/AppData/Local/Android/Sdk/extras/android/m2repository/com/android/tools/build/aapt2/3.3.0-alpha08-4963834/aapt2-3.3.0-alpha08-4963834.pom
  - file:/C:/Users/3D Electronics/AppData/Local/Android/Sdk/extras/android/m2repository/com/android/tools/build/aapt2/3.3.0-alpha08-4963834/aapt2-3.3.0-alpha08-4963834-windows.jar
  - https://jcenter.bintray.com/com/android/tools/build/aapt2/3.3.0-alpha08-4963834/aapt2-3.3.0-alpha08-4963834.pom
  - https://jcenter.bintray.com/com/android/tools/build/aapt2/3.3.0-alpha08-4963834/aapt2-3.3.0-alpha08-4963834-windows.jar
Required by:
    project :app

2 个答案:

答案 0 :(得分:3)

此链接可能会有所帮助。

Could not find com.android.tools.build:aapt2:3.2.0

简而言之,

buildscript {
  repositories {
      google() // here
      jcenter()
  }
  dependencies {
      classpath 'com.android.tools.build:gradle:3.2.0-alpha12'
  }
} 
allprojects {
  repositories {
      google() // and here
      jcenter()
}

答案 1 :(得分:0)

我已经通过更改gradle文件解决了我的问题

buildscript {
    repositories {
        jcenter()
        google()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.3.0-alpha13'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        jcenter()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}