gpt4 book ai didi

android - 找不到 com.android.tools :common:25. 2.3

转载 作者:太空狗 更新时间:2023-10-29 16:10:38 28 4
gpt4 key购买 nike

我已经在桌面上设置了编译 Cordova Android 应用程序的环境,并且一切正常。然后我在我的笔记本电脑上编译它,但我无法编译应用程序。

我收到这个错误

Could not find com.android.tools:common:25.2.3.
Searched in the following locations:
https://jcenter.bintray.com/com/android/tools/common/25.2.3/common-25.2.3.pom
https://jcenter.bintray.com/com/android/tools/common/25.2.3/common-25.2.3.jar
https://maven.google.com/com/android/tools/common/25.2.3/common-25.2.3.pom
https://maven.google.com/com/android/tools/common/25.2.3/common-25.2.3.jar
Required by:
project : > com.android.tools.build:gradle:2.2.3 > com.android.tools.build:gradle-core:2.2.3 > com.android.tools.build:builder:2.2.3
project : > com.android.tools.build:gradle:2.2.3 > com.android.tools.build:gradle-core:2.2.3 > com.android.tools.build:builder:2.2.3 > com.android.tools.build:manifest-merger:25.2.3
project : > com.android.tools.build:gradle:2.2.3 > com.android.tools.build:gradle-core:2.2.3 > com.android.tools.build:builder:2.2.3 > com.android.tools.ddms:ddmlib:25.2.3
project : > com.android.tools.build:gradle:2.2.3 > com.android.tools.build:gradle-core:2.2.3 > com.android.tools.build:builder:2.2.3 > com.android.tools.analytics-library:shared:25.2.3
project : > com.android.tools.build:gradle:2.2.3 > com.android.tools.build:gradle-core:2.2.3 > com.android.tools.build:builder:2.2.3 > com.android.tools.analytics-library:tracker:25.2.3
project : > com.android.tools.build:gradle:2.2.3 > com.android.tools.build:gradle-core:2.2.3 > com.android.tools.build:builder:2.2.3 > com.android.tools:sdklib:25.2.3 > com.android.tools.layoutlib:layoutlib-api:25.2.3
project : > com.android.tools.build:gradle:2.2.3 > com.android.tools.build:gradle-core:2.2.3 > com.android.tools.build:builder:2.2.3 > com.android.tools:sdklib:25.2.3 > com.android.tools:dvlib:25.2.3
project : > com.android.tools.build:gradle:2.2.3 > com.android.tools.build:gradle-core:2.2.3 > com.android.tools.build:builder:2.2.3 > com.android.tools:sdklib:25.2.3 > com.android.tools:repository:25.2.3

这是我的build.gradle

apply plugin: 'com.android.application'

buildscript {
repositories {
jcenter()
maven { url 'https://maven.google.com' }
}


dependencies {
classpath 'com.android.tools.build:gradle:2.2.3'
}
}

allprojects {
repositories {
jcenter()
maven { url 'https://maven.google.com' }
}
}

task wrapper(type: Wrapper) {
gradleVersion = '2.14.1'
}

最佳答案

对于 Cordova 用户

一整天都在为这个问题苦苦挣扎。这发生在新的 cordova android 项目上。这是我修复它的方法:

从您的项目文件夹导航到 platforms/android/cordovaLib 并打开 build.gradle 文件并替换此行:

classpath 'com.android.tools.build:gradle:2.2.3'

与:

classpath 'com.android.tools.build:gradle:2.3.0'

然后从 platforms/android/ 文件夹中打开 build.gradle 文件并进行上述更改。然后替换:

 maven {
url "https://maven.google.com"
}

与:

mavenCentral()

关于android - 找不到 com.android.tools :common:25. 2.3,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53678786/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com