2017-10-28 19 views
-1

このエラーが発生します。私は何をすることができます。私はアンドロイドスタジオに新しいです。 私はこれを解決するために最善を尽くしましたが、私はこれを解決できません。 このエラーが発生しています。 エラー: ':libraryMaskLayout:processDebugResources'タスクの実行に失敗しました。タスクappの実行に失敗しましたprocessdebugresourcesがxmlリソースファイルandroidスタジオの解析に失敗しました

Failed to parse XML resource file 'D:\Android\FastChargerAdmob\libraryMaskLayout\build\intermediates\bundles\debug\res\values\values.xml'

enter image description here 編集:私はポストを更新し、私は私のプロジェクトを持っているすべてのGradleのファイルを掲載しています。 build.gradle(プロジェクト)

// 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:3.0.0' 
     classpath 'com.google.gms:google-services:3.0.0' 

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

allprojects { 
    repositories { 
     jcenter() 
    } 
} 

task clean(type: Delete) { 
    delete rootProject.buildDir 
} 

Build.gradle(モジュール:アプリ)

apply plugin: 'com.android.application' 

android { 
    compileSdkVersion 25 
    buildToolsVersion '26.0.2' 
    defaultConfig { 
     applicationId "com.TuAndroidPR.fast.Chargin" 
     minSdkVersion 15 
     targetSdkVersion 25 
     versionCode 2 
     versionName "2.0" 
     testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 
    } 
    buildTypes { 
     release { 
      minifyEnabled true 
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
     } 
    } 
} 

dependencies { 
    compile fileTree(dir: 'libs', include: ['*.jar']) 
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { 
     exclude group: 'com.android.support', module: 'support-annotations' 
    }) 
    compile 'com.android.support:appcompat-v7:25.0.0' 
    testCompile 'junit:junit:4.12' 

    compile project(':libraryMaskLayout') 
    compile fileTree(dir: 'libs', include: ['*.jar']) 
    testCompile 'junit:junit:4.12' 
    compile 'com.android.support:appcompat-v7:25.0.0' 
    compile 'com.android.support:design:25.0.0' 
    compile 'com.github.lzyzsd:circleprogress:[email protected]' 
    compile 'com.android.support:cardview-v7:25.0.0' 
    compile 'cn.fanrunqi:waveprogress:1.0.1' 
    compile 'com.squareup.picasso:picasso:2.5.2' 
    //noinspection GradleCompatible 
    compile 'com.google.android.gms:play-services-ads:10.0.1' 
    compile 'com.google.firebase:firebase-ads:10.0.1' 
    compile 'com.google.firebase:firebase-core:10.0.1' 
} 
apply plugin: 'com.google.gms.google-services' 

Build.gradle(モジュール:libraryMaskLayout)

apply plugin: 'com.android.library' 

android { 
    compileSdkVersion 25 
    buildToolsVersion '26.0.2' 

    defaultConfig { 
     compileOptions { 
      sourceCompatibility JavaVersion.VERSION_1_7 
      targetCompatibility JavaVersion.VERSION_1_7 
     } 
    } 

    buildTypes { 
     release { 
      minifyEnabled false 
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' 
     } 
    } 
} 

dependencies { 
    compile files('libs/annotations-12.0.jar') 
} 
+0

投稿するbuild.gradle –

+0

3つのグラデルファイルがあります。プロジェクト、アプリ、libraryMaskLayoutのどちらに投稿する必要がありますか? – Suleman

+0

すべての3ファイルを投稿 –

答えて

0

libのbuild.gradle

依存関係{ ... compile 'com.android.supポート:サポート - 注釈:27.0.1 '

+0

あなたの答えを説明し、ソースコードをそのように書式化してください。 – ben

+0

削除または名前を変更する必要があります <! - - > –

1

buildToolsVersionをアップグレードするときにこの問題が発生しました。場合、他の誰がこの問題を持って、ここで私はそれを修正するためにやったことだ:

私はGradleのため--stacktraceをオンにし、上記の「XMLリソースファイルの解析に失敗しました」の後に、それは次のようなエラーを吐きましたが見つかりました:

debug/res/values/values.xml
Error:java.lang.IllegalArgumentException: 
Error: ' ' is not a valid resource name character 

、私はこれが見つかりました:AndroidのXMLルールパー

<enum name="DARKEN " value="2"/> 

、 "要素名" スペースを持つことはできません("DARKEN "を)。

"DARKEN "を検索すると、"DARKEN "がXML要素名に設定されたXMLファイルの1つに<enum>という名前が付けられます。私は末尾のスペースを削除し、コードをコンパイルしました。

関連する問題