gpt4 book ai didi

android - Gradle 同步失败。基本功能将无法正常工作

转载 作者:行者123 更新时间:2023-11-30 05:09:09 24 4
gpt4 key购买 nike

当我运行项目时,出现 gradle sync failed 错误。

这里是错误:
org.gradle.internal.resource.transport.http.HttpErrorStatusCodeException:无法头部'http://repo.pageturner-reader.org/com/highsoft/highcharts/highcharts/6.1.4/highcharts-6.1.4.pom '.从服务器收到状态代码 403:禁止<35 内部调用>

以下是完整的错误信息:

    Executing tasks: [assembleDebug]

WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
Could not find google-services.json while looking in [src/nullnull/debug, src/debug/nullnull, src/nullnull, src/debug, src/nullnullDebug]
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
Could not find google-services.json while looking in [src/nullnull/release, src/release/nullnull, src/nullnull, src/release, src/nullnullRelease]
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
:app:preBuild UP-TO-DATE
:app:preDebugBuild FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Could not resolve all files for configuration ':app:debugCompileClasspath'.
> Could not resolve com.osbcp.cssparser:cssparser:1.5.
Required by:
project :app
> Could not resolve com.osbcp.cssparser:cssparser:1.5.
> Could not get resource 'http://repo.pageturner-reader.org/com/osbcp/cssparser/cssparser/1.5/cssparser-1.5.pom'.
> Could not GET 'http://repo.pageturner-reader.org/com/osbcp/cssparser/cssparser/1.5/cssparser-1.5.pom'. Received status code 403 from server: Forbidden

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 17s

我的顶级构建文件是

buildscript {
repositories {
jcenter()
maven { url 'https://maven.fabric.io/public' }
maven { url 'https://maven.google.com' }
maven { url "https://highsoft.bintray.com/Highcharts"}
mavenCentral()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.1'
classpath 'com.google.gms:google-services:3.2.0'
classpath 'io.fabric.tools:gradle:1.25.1'
classpath "io.realm:realm-gradle-plugin:2.2.0"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}


这里是我的app级build.gradle文件内容。

buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.1'
classpath 'com.google.gms:google-services:3.0.0'
}
}

allprojects {
repositories {
google()
maven {
url "https://maven.google.com"
name 'Google'
}
maven {
url "http://repo.pageturner-reader.org"
}
maven {
url "https://highsoft.bintray.com/Highcharts"
}
maven {
url "https://jitpack.io"
}
jcenter()
}
}

请帮我解决这个问题。

最佳答案

您提到的错误信息不详细。要详细检查错误,请单击右侧的 Gradle 选项卡 -> app -> 双击 assembleDebug

关于android - Gradle 同步失败。基本功能将无法正常工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54006297/

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