1. 程式人生 > >Could not find com.android.tools.build:aapt2:3.2.0-4818971.

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

Could not find com.android.tools.build:aapt2:3.2.0-4818971.
Searched in the following locations:
    file:/G:/workspace/android/adt-bundle-windows-x86_64-20140702/sdk/extras/m2repository/com/android/tools/build/aapt2/3.2.0-4818971/aapt2-3.2.0-4818971.pom
    file:/G:/workspace/android/adt-bundle-windows-x86_64-20140702/sdk/extras/m2repository/com/android/tools/build/aapt2/3.2.0-4818971/aapt2-3.2.0-4818971-windows.jar
    file:/G:/workspace/android/adt-bundle-windows-x86_64-20140702/sdk/extras/google/m2repository/com/android/tools/build/aapt2/3.2.0-4818971/aapt2-3.2.0-4818971.pom
    file:/G:/workspace/android/adt-bundle-windows-x86_64-20140702/sdk/extras/google/m2repository/com/android/tools/build/aapt2/3.2.0-4818971/aapt2-3.2.0-4818971-windows.jar
    file:/G:/workspace/android/adt-bundle-windows-x86_64-20140702/sdk/extras/android/m2repository/com/android/tools/build/aapt2/3.2.0-4818971/aapt2-3.2.0-4818971.pom
    file:/G:/workspace/android/adt-bundle-windows-x86_64-20140702/sdk/extras/android/m2repository/com/android/tools/build/aapt2/3.2.0-4818971/aapt2-3.2.0-4818971-windows.jar
    https://jcenter.bintray.com/com/android/tools/build/aapt2/3.2.0-4818971/aapt2-3.2.0-4818971.pom
    https://jcenter.bintray.com/com/android/tools/build/aapt2/3.2.0-4818971/aapt2-3.2.0-4818971-windows.jar
Required by:
    project :app

是因為as版本和gradle版本不相容,gradle版本改成2.3.2 就好了,

dependencies {
    classpath 'com.android.tools.build:gradle: 2.3.2'//1.2.3       2.3.2