gpt4 book ai didi

android - Cordova 构建失败 : Could not find support-v4. jar

转载 作者:太空狗 更新时间:2023-10-29 13:46:37 31 4
gpt4 key购买 nike

我不知道我做了什么,但我的构建在 android 上失败了 3 个小时,我无法修复它......有日志:

ANDROID_HOME= C:\Users\User\AppData\Local\Android\Sdk JAVA_HOME=C:\Program Files\Java\jdk1.8.0_121 Subproject Path: CordovaLib The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead. at.build_bxct3n5fn9ey9qgc57qreulsp.run(C:\Users\User\MyProject\application\platforms\android\build.gradle:143)

The JavaCompile.setDependencyCacheDir() method has been deprecated and is scheduled to be removed in Gradle 4.0.

Incremental java compilation is an incubating feature.

The TaskInputs.source(Object) method has been deprecated and is scheduled to be removed in Gradle 4.0. Please use TaskInputs.file(Object).skipWhenEmpty() instead.

WARNING: Module 'com.android.support:support-v4:26.1.0' depends on one or more Android Libraries but is a jar

FAILURE: Build failed with an exception.

  • What went wrong: A problem occurred configuring root project 'android'.

    Could not find support-v4.jar (com.android.support:support-v4:26.1.0). Searched in the following locations: BUILD FAILED

总时间:1.569 秒

  https://jcenter.bintray.com/com/android/support/support-v4/26.1.0/support-v4-26.1.0.jar
  • 尝试:使用 --stacktrace 选项运行以获取堆栈跟踪。使用 --info 或 --debug 选项运行以获得更多日志输出。 cmd:命令失败,退出代码为 1 错误输出:FAILURE: Build failed with an 异常(exception)。

  • 出了什么问题:配置根项目“android”时出现问题。

    Could not find support-v4.jar (com.android.support:support-v4:26.1.0). Searched in the following locations: https://jcenter.bintray.com/com/android/support/support-v4/26.1.0/support-v4-26.1.0.jar

  • 尝试:使用 --stacktrace 选项运行以获取堆栈跟踪。使用 --info 或 --debug 选项运行以获得更多日志输出。

我使用(已编辑:)cordova-android@6.4.0 和 cordova 8.1.2(cordova-lib@8.1.1)

希望有人能帮助我...

最佳答案

build.gradle repositories 更改为使用 maven 存储库解决了这个问题:

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

这个文件可以在 platforms/android/build.gradle 中找到。

关于android - Cordova 构建失败 : Could not find support-v4. jar,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52951571/

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