Could not find com.android.tools.build:gradle:3.3
2017-06-06 11:47
471 查看
1. 问题描述:
android studio中,新导入一个android项目,编译错误如下:
Error:Could not find com.android.tools.build:gradle:3.3.
Searched in the following locations:
file:/D:/as231/gradle/m2repository/com/android/tools/build/gradle/3.3/gradle-3.3.pom
file:/D:/as231/gradle/m2repository/com/android/tools/build/gradle/3.3/gradle-3.3.jar
https://repo1.maven.org/maven2/com/android/tools/build/gradle/3.3/gradle-3.3.pom
https://repo1.maven.org/maven2/com/android/tools/build/gradle/3.3/gradle-3.3.jar
Required by:
project :
2. 分析与解决:
很显然,是gradle版本没有找到。查看本地目录,的确没有“D:/as231/gradle/m2repository/com/android/tools/build/gradle/3.3/”。
只有一个2.3.1的目录。于是,将build.gradle中相关的classpath改为2.3.1,问题解决。如下图:
android studio中,新导入一个android项目,编译错误如下:
Error:Could not find com.android.tools.build:gradle:3.3.
Searched in the following locations:
file:/D:/as231/gradle/m2repository/com/android/tools/build/gradle/3.3/gradle-3.3.pom
file:/D:/as231/gradle/m2repository/com/android/tools/build/gradle/3.3/gradle-3.3.jar
https://repo1.maven.org/maven2/com/android/tools/build/gradle/3.3/gradle-3.3.pom
https://repo1.maven.org/maven2/com/android/tools/build/gradle/3.3/gradle-3.3.jar
Required by:
project :
2. 分析与解决:
很显然,是gradle版本没有找到。查看本地目录,的确没有“D:/as231/gradle/m2repository/com/android/tools/build/gradle/3.3/”。
只有一个2.3.1的目录。于是,将build.gradle中相关的classpath改为2.3.1,问题解决。如下图:
buildscript { repositories { mavenCentral() } dependencies { classpath 'com.android.tools.build:gradle:2.3.1' } }
相关文章推荐
- 更新Android Studio版本出现Could not find com.android.tools.build:gradle:2.2.3
- Could not find com.android.tools.build:gradle:2.2.3
- Android Studio:Error:Could not find com.android.tools.build:gradle:XXX解决方法
- Failed to apply plugin [id 'com.android.application'] 和 Could not find com.android.tools.build:gradle:2.XX的最正确的解决方法
- Gradle sync failed: Could not find com.android.tools.build:gradle
- Android Studio下“Error:Could not find com.android.tools.build:gradle:2.2.1”的解决方法
- could not find com.android.tools.build:gradle:2.2.3
- 解决 Could not find com.android.tools.build:gradle 问题
- Android Studio下项目编译出错could not find com.android.tools.buildgradle:2.2.2
- Could not find com.android.tools.build:gradle:2.14.1.
- 【AndroidStudio】Error:Could not find com.android.tools.build:gradle:2.3.3
- 更新Android Studio版本出现Could not find com.android.tools.build:gradle:2.2.3
- Android Studio下“Error:Could not find com.android.tools.build:gradle:2.2.1”的解决方法
- Error:Could not find com.android.tools.build:gradle:2.3.3.
- Android 解决Could not find com.android.tools.build:gradle
- Could not find com.android.tools.build:gradle:1.3.0.
- Could not find com.android.tools.build:gradle:2.2.2.
- Could not find com.android.tools.build:gradle:3.0.1
- Android studio 升级3.0后ReactNative 打包报错 Could not find com.android.tools.build:gradle:3.0.0.
- Error:Could not find com.android.tools.build:gradle:2.14.1.