Error:Could not find com.android.tools.build:gradle:2.3.3.

时间:2023-02-02 22:52:48
今天导入同事的代码时,因gradle插件 不一样出现了问题:

Error:Could not find com.android.tools.build:gradle:2.3.3.

Gradle sync failed: Could not find com.android.tools.build:gradle:2.3.3.
Searched in the following locations:
https://repo1.maven.org/maven2/com/android/tools/build/gradle/2.3.3/gradle-2.3.3.pom
https://repo1.maven.org/maven2/com/android/tools/build/gradle/2.3.3/gradle-2.3.3.jar
Required by:
project :volley
Consult IDE log for more details (Help | Show Log) (4s 813ms)


经过一番排查,问题解决;

问题原因:

Error:Could not find com.android.tools.build:gradle:2.3.3. build.gradle 用的是  mavenCentral(); 而maven 中只有最高2.3.0Error:Could not find com.android.tools.build:gradle:2.3.3.

没有所需的2.3.3,所以,解决办法是:

不用mavenCentral , 改为用:jcenter();

最后问题解决