gpt4 book ai didi

gradle - 配置 'compile'已过时。替换为实现后出现错误

转载 作者:行者123 更新时间:2023-12-03 06:28:26 25 4
gpt4 key购买 nike

我正在运行一个现有项目,只是需要一些帮助来更新现有项目的应用程序级别build.gradle。当我用实现替换关键字compile时,它对我不起作用。此外,我在gradle-wrapper.properties中使用“gradle-6.1.1-all.zip”,在另一个build.gradle中使用类路径“com.android.tools.build:gradle:4.0.0”。以及如何替换其他Firebase依赖项

dependencies {
compile project(':realm')
compile project(':react-native-vector-icons')
compile project(':react-native-lock')
compile project(':react-native-firebase')
implementation project(':realm')
implementation project(':react-native-vector-icons')
implementation fileTree(dir: "libs", include: ["*.jar"])
implementation "com.android.support:appcompat-v7:28.0.0"
implementation "com.facebook.react:react-native:+" // From node_modules
implementation project(':react-native-firebase')

// Firebase dependencies
implementation "com.google.android.gms:play-services-base:15.0.1"
implementation "com.google.firebase:firebase-core:16.0.1"
implementation "com.google.firebase:firebase-database:16.0.1"
implementation "com.google.firebase:firebase-auth:16.0.2"
implementation "com.google.firebase:firebase-messaging:17.1.0"
implementation 'me.leolin:ShortcutBadger:1.1.21@aar'
}
这是终端上的错误
problem occurred configuring project ':react-native-lock'.
> Could not resolve all artifacts for configuration ':react-native-lock:classpath'.
> Could not download gradle-core-1.3.1.jar (com.android.tools.build:gradle-core:1.3.1)
> Could not get resource 'https://jcenter.bintray.com/com/android/tools/build/gradle-core/1.3.1/gradle-core-1.3.1.jar'.
> Could not HEAD 'https://jcenter.bintray.com/com/android/tools/build/gradle-core/1.3.1/gradle-core-1.3.1.jar'.
> Connection reset
> Could not download lint-24.3.1.jar (com.android.tools.lint:lint:24.3.1)
> Could not get resource 'https://jcenter.bintray.com/com/android/tools/lint/lint/24.3.1/lint-24.3.1.jar'.
> Could not HEAD 'https://jcenter.bintray.com/com/android/tools/lint/lint/24.3.1/lint-24.3.1.jar'.
> jcenter.bintray.com
> Could not download dvlib-24.3.1.jar (com.android.tools:dvlib:24.3.1)
> Could not get resource 'https://jcenter.bintray.com/com/android/tools/dvlib/24.3.1/dvlib-24.3.1.jar'.
> Could not HEAD 'https://jcenter.bintray.com/com/android/tools/dvlib/24.3.1/dvlib-24.3.1.jar'.
> Connection reset
> Could not download common-24.3.1.jar (com.android.tools:common:24.3.1)
> Could not get resource 'https://jcenter.bintray.com/com/android/tools/common/24.3.1/common-24.3.1.jar'.
> Could not HEAD 'https://jcenter.bintray.com/com/android/tools/common/24.3.1/common-24.3.1.jar'.
> Connection reset
> Could not download bcpkix-jdk15on-1.48.jar (org.bouncycastle:bcpkix-jdk15on:1.48)
> Could not get resource 'https://jcenter.bintray.com/org/bouncycastle/bcpkix-jdk15on/1.48/bcpkix-jdk15on-1.48.jar'.
> Could not HEAD 'https://jcenter.bintray.com/org/bouncycastle/bcpkix-jdk15on/1.48/bcpkix-jdk15on-1.48.jar'.
> Connection reset
> Could not download bcprov-jdk15on-1.48.jar (org.bouncycastle:bcprov-jdk15on:1.48)
> Could not get resource 'https://jcenter.bintray.com/org/bouncycastle/bcprov-jdk15on/1.48/bcprov-jdk15on-1.48.jar'.
> Could not HEAD 'https://jcenter.bintray.com/org/bouncycastle/bcprov-jdk15on/1.48/bcprov-jdk15on-1.48.jar'.
> No such host is known (jcenter.bintray.com)
> Could not download asm-analysis-5.0.3.jar (org.ow2.asm:asm-analysis:5.0.3)
> Could not get resource 'https://jcenter.bintray.com/org/ow2/asm/asm-analysis/5.0.3/asm-analysis-5.0.3.jar'.
> Could not HEAD 'https://jcenter.bintray.com/org/ow2/asm/asm-analysis/5.0.3/asm-analysis-5.0.3.jar'.
> jcenter.bintray.com
> Could not download asm-tree-5.0.3.jar (org.ow2.asm:asm-tree:5.0.3)
> Could not get resource 'https://jcenter.bintray.com/org/ow2/asm/asm-tree/5.0.3/asm-tree-5.0.3.jar'.
> Could not HEAD 'https://jcenter.bintray.com/org/ow2/asm/asm-tree/5.0.3/asm-tree-5.0.3.jar'.
> jcenter.bintray.com
> Could not download asm-5.0.3.jar (org.ow2.asm:asm:5.0.3)
> Could not get resource 'https://jcenter.bintray.com/org/ow2/asm/asm/5.0.3/asm-5.0.3.jar'.
> Could not HEAD 'https://jcenter.bintray.com/org/ow2/asm/asm/5.0.3/asm-5.0.3.jar'.
> jcenter.bintray.com
> Could not download jack-api-0.9.0.jar (com.android.tools.jack:jack-api:0.9.0)
> Could not get resource 'https://jcenter.bintray.com/com/android/tools/jack/jack-api/0.9.0/jack-api-0.9.0.jar'.
> Could not HEAD 'https://jcenter.bintray.com/com/android/tools/jack/jack-api/0.9.0/jack-api-0.9.0.jar'.
> jcenter.bintray.com
> Could not download jill-api-0.9.0.jar (com.android.tools.jill:jill-api:0.9.0)
> Could not get resource 'https://jcenter.bintray.com/com/android/tools/jill/jill-api/0.9.0/jill-api-0.9.0.jar'.
> Could not HEAD 'https://jcenter.bintray.com/com/android/tools/jill/jill-api/0.9.0/jill-api-0.9.0.jar'.
> jcenter.bintray.com
> Could not download ecj-4.4.2.jar (org.eclipse.jdt.core.compiler:ecj:4.4.2)
> Could not get resource 'https://jcenter.bintray.com/org/eclipse/jdt/core/compiler/ecj/4.4.2/ecj-4.4.2.jar'.
> Could not HEAD 'https://jcenter.bintray.com/org/eclipse/jdt/core/compiler/ecj/4.4.2/ecj-4.4.2.jar'.
> jcenter.bintray.com
> Could not download proguard-base-5.2.1.jar (net.sf.proguard:proguard-base:5.2.1)
> Could not get resource 'https://jcenter.bintray.com/net/sf/proguard/proguard-base/5.2.1/proguard-base-5.2.1.jar'.
> Could not HEAD 'https://jcenter.bintray.com/net/sf/proguard/proguard-base/5.2.1/proguard-base-5.2.1.jar'.
> jcenter.bintray.com

最佳答案

Gradle试图从jcenter访问文件,但没有成功。我认为这与gradle或api /实现的使用无关(与编译无关)
您是否可以访问日志中提供的URL?我建议您检查连接状态/代理状态/…或重试。它应该工作。

关于gradle - 配置 'compile'已过时。替换为实现后出现错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63560455/

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