gpt4 book ai didi

android - 无法同步 Gradle 项目 "Application name"

转载 作者:行者123 更新时间:2023-12-03 05:15:56 28 4
gpt4 key购买 nike

我今天安装了Android Studio,当我创建新项目时,Gradle 无法同步项目,(Android Studio 1.2 (JDK 1.7), Windows)

错误:无法找到方法 'org.apache.commons.io.FileUtils.deleteQuietly(Ljava/io/File;)Z'。
此意外错误的可能原因包括:
Gradle 的依赖缓存可能已损坏(这有时会在网络连接超时后发生。)
重新下载依赖并同步项目(需要网络)
Gradle 构建过程(守护进程)的状态可能已损坏。停止所有 Gradle 守护程序可能会解决此问题。
停止 Gradle 构建过程(需要重新启动)
在 Gradle 进程损坏的情况下,您还可以尝试关闭 IDE,然后杀死所有 Java 进程。
我做了上面两个步骤,还是不行,当我点击重新下载依赖时,什么也没发生(有互联网连接)

// Top-level build file where you can add configuration options common to all sub-projects/modules.  

buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.2.2'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

allprojects {
repositories {
jcenter()
}
}

最佳答案

当我更新我的 android studio 时,我遇到了同样的问题。这是我找到的解决方案:在项目树“app”上,右键单击鼠标按钮以获取上下文菜单。选择“打开模块设置”,在树“应用程序”-“属性”选项卡上,选择现有的“构建工具版本”。 gradle 将开始构建。

关于android - 无法同步 Gradle 项目 "Application name",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30154487/

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