【问题标题】:Android studio gradle issues, Content is not allowed in prologAndroid studio gradle 问题,prolog 中不允许有内容
【发布时间】:2015-10-05 07:06:27
【问题描述】:

这个错误刚刚出现,它一直在同步和构建,现在无法再构建或同步 gradle?

我已经尝试通过单击构建来清理构建 -> 清理构建也没有工作?现在真的很烦!!

* Where:

构建文件 '/home/mikaeljohansson/AndroidStudioProjects/myproj/build.gradle' 行:5

  • 出了什么问题: 评估根项目“myproj”时出现问题。

    在存储库容器上找不到参数 [] 的方法 jcenter()。

这是其他 gradle.build 文件:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.1"

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

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    compile 'com.android.support:appcompat-v7:23.0.1'
    compile files('libs/achartengine-1.1.0.jar')
}

这是全球的另一个

    // 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.3.0'

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

allprojects {
    repositories {
        jcenter()
    }
}

【问题讨论】:

  • 在此处发布您的构建日志。
  • 我在代码中使用非 UTF8 字符时遇到了这个问题
  • 好的 gradle 文件已添加,我无法运行 gradle clean
  • 你用的是哪个版本的gradle?

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


【解决方案1】:

通过移除 res 目录结构下的地图解决的问题!

【讨论】:

    猜你喜欢
    • 2014-06-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-12-15
    • 2016-09-06
    • 1970-01-01
    相关资源
    最近更新 更多