gpt4 book ai didi

Android Studio Gradle - 无法解析依赖项 : acra

转载 作者:行者123 更新时间:2023-11-29 17:19:40 25 4
gpt4 key购买 nike

我愿意将 Acra 添加到我的 android studio 项目中。

然而,虽然tutorial看起来很简单,我无法获得依赖项,并且出现错误:

解析失败:ch.acra:acra:4.8.5

成绩文件:

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

apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'

dependencies {
compile fileTree(dir: 'libs', include: '*.jar')
compile 'com.android.support:support-v4:21.+'
compile 'ch.acra:acra:4.8.5'
compile 'com.google.android.gms:play-services-location:8.3.0'
compile ('com.google.android.gms:play-services-analytics:8.3.0') {
exclude module: 'support-v4'
}

}

我错过了什么?

我也在终端中得到这个:

* What went wrong:
A problem occurred configuring root project 'WifiCapture'.
> Could not resolve all dependencies for configuration ':_debugCompile'.
> Could not find ch.acra:acra:4.8.5.
Searched in the following locations:
file:/Users/myuser/Library/Android/sdk/extras/android/m2repository/ch/acra/acra/4.8.5/acra-4.8.5.pom
file:/Users/myuser/Library/Android/sdk/extras/android/m2repository/ch/acra/acra/4.8.5/acra-4.8.5.jar
file:/Users/myuser/Library/Android/sdk/extras/google/m2repository/ch/acra/acra/4.8.5/acra-4.8.5.pom
file:/Users/myuser/Library/Android/sdk/extras/google/m2repository/ch/acra/acra/4.8.5/acra-4.8.5.jar
Required by:
:MyApp:unspecified

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

最佳答案

问题是 repositories block 应该在 buildscript block 之外

关于Android Studio Gradle - 无法解析依赖项 : acra,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37105277/

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