gpt4 book ai didi

Android Studio 1.0 Gradle 错误与 getConfiguration()

转载 作者:塔克拉玛干 更新时间:2023-11-02 21:47:28 25 4
gpt4 key购买 nike

我根据需要更改了我的 gradle 文件中的所有其他内容,但我遇到了一个我似乎无法解决的错误:

Error:Unable to find method 'org.gradle.api.internal.project.ProjectInternal.getConfigurations()Lorg/gradle/api/internal/artifacts/configurations/ConfigurationContainerInternal;'.

Possible causes for this unexpected error include:<ul><li>Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.)

Re-download dependencies and sync project (requires network)
The state of a Gradle build process (daemon) may be corrupt. Stopping all Gradle daemons may solve this problem.

Stop Gradle build processes (requires restart)
In the case of corrupt Gradle processes, you can also try closing the IDE and then killing all Java processes.

如果有任何帮助,这是我的主要 build.gradle 文件:

apply plugin: 'com.android.application'

android {
compileSdkVersion 21
buildToolsVersion "21.1.1"

defaultConfig {
minSdkVersion 16
targetSdkVersion 21
versionCode 9
versionName "1.6"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile files('libs/gson-2.2.4.jar')
compile project('libs:anddown')
compile 'com.android.support:appcompat-v7:21.0.2'
compile files('libs/android-support-v7-recyclerview.jar')
}

最佳答案

我能够通过升级到我的 android maven 插件的最新版本来解决这个错误:

buildscript {
repositories {
mavenCentral()
}
dependencies {
...
classpath 'com.github.dcendents:android-maven-plugin:1.2'
}
}

关于Android Studio 1.0 Gradle 错误与 getConfiguration(),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27410183/

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