android - Gradle无法刷新Android Studio

标签 android gradle android-studio android-gradle-plugin

自从我不断收到错误消息以来,我一直在安装并重新安装AndroidStudio

>  Gradle 'android' project refresh failed:
>                Open quote is expected for attribute "{1}" associated with an  element type  "language".

除我以外,我所有的小组成员都可以打开该项目而不会收到此错误。我非常需要帮助,我只想在本学期完成我的小组项目。谢谢您的帮助。

settings.gradle
include ':app'

在app文件夹中的build.gradle
apply plugin: 'android'

android {
    compileSdkVersion 19
    buildToolsVersion "19.0.1"

    defaultConfig {
        minSdkVersion 16
        targetSdkVersion 19
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            runProguard false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
        }
    }
}

dependencies {

    compile 'com.android.support:appcompat-v7:+'
    compile 'com.google.android.gms:play-services:4.3.23'
    compile 'com.android.support:support-v4:18.0.0'
    files('libs/json-simple-1.1.1.jar')
    compile files('libs/json-simple-1.1.1.jar')
}

gradle文件夹中的build.gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:0.7.+'
    }
}

allprojects {
    repositories {
        mavenCentral()
    }
}

更新:又重新安装了Android Studio,现在它给了我这个错误。
Failed to refresh Gradle project 'android'
           Out of memory: Java heap space. Configure Gradle memory settings using '-Xmx' JVM option (e.g. '-Xmx2048m'.)
           Please fix the project's Gradle settings.
           Gradle settings

最佳答案

您可能键入了封闭引号(“)而不是开放引号(”)。请更改属性开头和结尾的引号。

关于android - Gradle无法刷新Android Studio,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23404150/

相关文章:

java - 在Java中将一个巨大的txt制作成数组的过程

android - Google Android - 如何确定 3g 和 2g 是否打开

java - 编译Java/Gradle Discord Bot

android - 检测库是独立构建还是使用 Gradle 作为应用程序依赖项

Android 模拟器 (Nexus_5_API_23_x86) 未启动

android - Android strings.xml中的下标5

Android 主要 Activity 崩溃 - 致命异常 : main

android-studio - Flutter "audio"音频文件目录不起作用

java - 在gradle中添加依赖项后无法导入javax.servlet

android-studio - 配置 Gradle 连接超时