- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
当我运行命令Cordova compile android或cordova build时,我收到CMD错误。
D:\Cordova\NewCordova\hogya>cordova compile android
Android Studio project detected
ANDROID_HOME=C:\Users\29556\AppData\Local\Android\Sdk
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_131
studio
Subproject Path: CordovaLib
Subproject Path: app
Downloading https://services.gradle.org/distributions/gradle-4.1-all.zip
................................................................................
.....
Unzipping C:\Users\29556\.gradle\wrapper\dists\gradle-4.1-all\bzyivzo6n839fup2jb
ap0tjew\gradle-4.1-all.zip to C:\Users\29556\.gradle\wrapper\dists\gradle-4.1-al
l\bzyivzo6n839fup2jbap0tjew
Starting a Gradle Daemon, 1 busy and 1 incompatible and 1 stopped Daemons could
not be reused, use --status for details
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':CordovaLib'.
> Could not resolve all files for configuration ':CordovaLib:classpath'.
> Could not resolve com.android.tools.build:gradle:3.0.0.
Required by:
project :CordovaLib
> Could not resolve com.android.tools.build:gradle:3.0.0.
> Could not get resource 'https://jcenter.bintray.com/com/android/tools
/build/gradle/3.0.0/gradle-3.0.0.pom'.
> Could not HEAD 'https://jcenter.bintray.com/com/android/tools/buil
d/gradle/3.0.0/gradle-3.0.0.pom'.
> Connect to 10.6.13.208:8080 [/10.6.13.208] failed: Connection t
imed out: connect
> Could not resolve com.android.tools.build:gradle:3.0.0.
> Could not get resource 'https://maven.google.com/com/android/tools/bu
ild/gradle/3.0.0/gradle-3.0.0.pom'.
> Could not HEAD 'https://maven.google.com/com/android/tools/build/g
radle/3.0.0/gradle-3.0.0.pom'.
> Connect to 10.6.13.208:8080 [/10.6.13.208] failed: Connection t
imed out: connect
> Could not resolve com.github.dcendents:android-maven-gradle-plugin:1.5.
Required by:
project :CordovaLib
> Could not resolve com.github.dcendents:android-maven-gradle-plugin:1.5.
> Could not get resource 'https://jcenter.bintray.com/com/github/dcende
nts/android-maven-gradle-plugin/1.5/android-maven-gradle-plugin-1.5.pom'.
> Could not GET 'https://jcenter.bintray.com/com/github/dcendents/an
droid-maven-gradle-plugin/1.5/android-maven-gradle-plugin-1.5.pom'.
> Connect to 10.6.13.208:8080 [/10.6.13.208] failed: Connection t
imed out: connect
> Could not resolve com.github.dcendents:android-maven-gradle-plugin:1.5.
> Could not get resource 'https://maven.google.com/com/github/dcendents
/android-maven-gradle-plugin/1.5/android-maven-gradle-plugin-1.5.pom'.
> Could not GET 'https://maven.google.com/com/github/dcendents/andro
id-maven-gradle-plugin/1.5/android-maven-gradle-plugin-1.5.pom'.
> Connect to 10.6.13.208:8080 [/10.6.13.208] failed: Connection t
imed out: connect
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug
option to get more log output.
* Get more help at https://help.gradle.org
BUILD FAILED in 6m 16s
(node:5548) UnhandledPromiseRejectionWarning: Error: cmd: Command failed with ex
it code 1 Error output:
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':CordovaLib'.
> Could not resolve all files for configuration ':CordovaLib:classpath'.
> Could not resolve com.android.tools.build:gradle:3.0.0.
Required by:
project :CordovaLib
> Could not resolve com.android.tools.build:gradle:3.0.0.
> Could not get resource 'https://jcenter.bintray.com/com/android/tools
/build/gradle/3.0.0/gradle-3.0.0.pom'.
> Could not HEAD 'https://jcenter.bintray.com/com/android/tools/buil
d/gradle/3.0.0/gradle-3.0.0.pom'.
> Connect to 10.6.13.208:8080 [/10.6.13.208] failed: Connection t
imed out: connect
> Could not resolve com.android.tools.build:gradle:3.0.0.
> Could not get resource 'https://maven.google.com/com/android/tools/bu
ild/gradle/3.0.0/gradle-3.0.0.pom'.
> Could not HEAD 'https://maven.google.com/com/android/tools/build/g
radle/3.0.0/gradle-3.0.0.pom'.
> Connect to 10.6.13.208:8080 [/10.6.13.208] failed: Connection t
imed out: connect
> Could not resolve com.github.dcendents:android-maven-gradle-plugin:1.5.
Required by:
project :CordovaLib
> Could not resolve com.github.dcendents:android-maven-gradle-plugin:1.5.
> Could not get resource 'https://jcenter.bintray.com/com/github/dcende
nts/android-maven-gradle-plugin/1.5/android-maven-gradle-plugin-1.5.pom'.
> Could not GET 'https://jcenter.bintray.com/com/github/dcendents/an
droid-maven-gradle-plugin/1.5/android-maven-gradle-plugin-1.5.pom'.
> Connect to 10.6.13.208:8080 [/10.6.13.208] failed: Connection t
imed out: connect
> Could not resolve com.github.dcendents:android-maven-gradle-plugin:1.5.
> Could not get resource 'https://maven.google.com/com/github/dcendents
/android-maven-gradle-plugin/1.5/android-maven-gradle-plugin-1.5.pom'.
> Could not GET 'https://maven.google.com/com/github/dcendents/andro
id-maven-gradle-plugin/1.5/android-maven-gradle-plugin-1.5.pom'.
> Connect to 10.6.13.208:8080 [/10.6.13.208] failed: Connection t
imed out: connect
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug
option to get more log output.
* Get more help at https://help.gradle.org
BUILD FAILED in 6m 16s
at ChildProcess.whenDone (D:\Cordova\NewCordova\hogya\platforms\android\cord
ova\node_modules\cordova-common\src\superspawn.js:169:23)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at maybeClose (internal/child_process.js:925:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:209:5)
(node:5548) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This
error originated either by throwing inside of an async function without a catch
block, or by rejecting a promise which was not handled with .catch(). (rejection
id: 1)
(node:5548) [DEP0018] DeprecationWarning: Unhandled promise rejections are depre
cated. In the future, promise rejections that are not handled will terminate the
Node.js process with a non-zero exit code.`
最佳答案
您确实必须添加google()
作为存储库。根据您的日志,似乎gradle仅在jcenter
和maven
存储库中搜索gradle插件,并且它们没有该插件(至少在该版本上)。
一种选择是将google()添加到init.gradle
.gradle
文件夹。通常位于:C:\Users\<YOUR_USER_NAME>\.gradle
init.gradle
:C:\Users\<YOUR_USER_NAME>\.gradle\init.gradle
allprojects {
buildscript.repositories {
google()
jcenter({ url "http://jcenter.bintray.com" })
maven { url "https://maven.google.com" }
}
repositories {
google()
jcenter({ url "http://jcenter.bintray.com" })
maven { url "https://maven.google.com" }
}
}
google()
,
jcenter()
和
maven()
存储库添加到所有项目中。
关于android - Cordova 构建失败,但出现以下异常:无法解析com.android.tools.build:gradle:3.0.0,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51595572/
我想使用 Google OR-Tools 解决车辆路径问题 (vrp),但使用与提供的元启发式不同的元启发式,它们是:贪婪下降、引导局部搜索、模拟退火、禁忌搜索和目标禁忌搜索。这就是此处文档中的解释:
对于 or-tools 中的 VRP,有没有办法让车辆从某些固定位置开始,但允许任意结束位置? 文档 https://developers.google.com/optimization/routin
我创建了新文件“Makefile.local”,并将“WINDOWS_SCIP_DIR=c:/Program Files/SCIPOptSuite”添加到文件中。 SCIP也编译成功,文件路径正确。
这个问题在这里已经有了答案: What are the Android SDK build-tools, platform-tools and tools? And which version sh
我正在尝试在 OR-TOOLS RL VRPTW 问题中强制执行位移长度约束。类次时长是车辆在服务中的总时间(运输 + 等待 + 服务),从到达第一个位置到离开最后一个位置。 它看起来像一个 Time
我正在尝试在 OR-TOOLS RL VRPTW 问题中强制执行位移长度约束。类次时长是车辆在服务中的总时间(运输 + 等待 + 服务),从到达第一个位置到离开最后一个位置。 它看起来像一个 Time
命令后: go build 显示错误: go tool: no such tool "link" 详细信息:我的系统是 windows 10 -> 64 位 go version: 1.11.5
我已经在我的 Ubuntu 桌面上安装了 go,在我关闭计算机之前它运行良好。 现在,当我启动我的机器并继续我的项目工作时,我明白了 $ go build go tool: no such tool
我正在为 Job-Shop 问题实现一个类似的解决方案,但有一个区别:我不知道必须执行每项任务的机器。解决这个问题也是问题的一部分。事实上,我们可以说,我正在尝试解决护士问题和工作车间问题的组合。 更
我知道Spring Tool Suite是为Spring开发而优化的,而Groovy / Grails是为Groovy / Grails开发的而优化的。 Groovy / Grails开发人员是否愿意
在 Chrome Dev Tools 中,我可以 Shift+单击检查器中的颜色来更改格式(Hex -> RGB -> HSL)。我可以在 Firefox Dev Tools 中做到这一点吗?我可以在
我目前正在评估谷歌或工具,只是注意到它本身并不是真正的求解器,而主要是与其他求解器的接口(interface)。我想知道的是这个框架使用哪些求解器来解决约束和路由问题。 我已经看透了https://d
我正在尝试使用命令 firebase init 初始化 Firebase 项目,但我收到消息 Error: Command requires authentication, please run fi
是什么决定了工具进入特定目录?例如,adb 位于 tools/但已移至 platform-tools/。为什么他们不能在同一个目录中? 最佳答案 platform-tools/ 主要包含从 Windo
我刚刚将 Android Studio 更新到了 2.3 版(金丝雀版)和最后的构建工具 'com.android.tools.build:gradle:2.3.0-alpha1' 以及当我打开布局并
我一直在使用 SQL Server 项目来管理数据库的结构。 首先我创建了项目,然后导入了一个数据库。 然后,当我需要更改架构时,比如更改字段名称,我会在 SQL Server 项目中进行,然后使用架
我正在尝试使用 Google OR-Tools 的 CP-Solver 解决问题。是否可以添加这样的约束:x1 异或 x2 异或 x3 == 0提前致谢。 最佳答案 AddBoolXOr of n 个
我需要为此获取源代码,但不幸的是,我无法在 jquerytools.org 上找到它的链接。该站点上的论坛也已关闭。有谁知道我可以从哪里获得这个来源或取消缩小它? 谢谢,罗布 最佳答案 你有没有试过继
我需要为此获取源代码,但不幸的是,我无法在 jquerytools.org 上找到它的链接。该站点上的论坛也已关闭。有谁知道我可以从哪里获得这个来源或取消缩小它? 谢谢,罗布 最佳答案 你有没有试过继
我正在使用Spring Tool Suite: 版本:3.9.0.RELEASE 建立编号:201707061903 平台:Eclipse Neon.3(4.6.3) 并安装了Gradle插件: Bu
我是一名优秀的程序员,十分优秀!