2017-07-09 8 views
0

Android Studioで作業していましたが、私はrecyclerViewをbuild.gradleに追加することにしました。それを追加し、Gradleのを同期した後、私はこのエラーを得た:でも私は、プロジェクトを再構築しないgradleが正しく動作しません

enter image description here

Executing tasks: [:app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:mockableAndroidJar, :app:prepareDebugUnitTestDependencies] 

が、このタスクでも、私は同じエラーを得ました。他の方法のためにキャッシュを無効にする/再起動しかし、それはまだ動作していない私の問題が存在します。 私はインスタントランをオフにしますが、同じエラーが発生しました。 私のユーザーの.gradleフォルダを削除しましたが、まだこのエラーが発生しました!!! この問題をどのように解決できますか?

私のbuild.gradle:

apply plugin: 'com.android.application' 

android { 
compileSdkVersion 26 
buildToolsVersion "26.0.0" 
defaultConfig { 
    applicationId "com.example.sayres.mychat" 
    minSdkVersion 15 
    targetSdkVersion 26 
    versionCode 1 
    versionName "1.0" 
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 
} 
buildTypes { 
    release { 
     minifyEnabled false 
     proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
    } 
} 
} 

dependencies { 
compile fileTree(include: ['*.jar'], dir: 'libs') 
androidTestCompile('com.android.support.test.espresso:espresso- core:2.2.2', { 
    exclude group: 'com.android.support', module: 'support-annotations' 
}) 
compile('org.eclipse.paho:org.eclipse.paho.android.service:1.0.2') { 
    exclude module: 'support-v4' 
} 
compile('org.eclipse.paho:org.eclipse.paho.android.service:1.0.3-SNAPSHOT') { 
    exclude module: 'support-v4' 
} 
compile 'com.android.support:appcompat-v7:26.+' 
compile 'com.android.support.constraint:constraint-layout:1.0.2' 
testCompile 'junit:junit:4.12' 
} 

編集:これらの行apeareのGradleコンソールで

Error: Some file crunching failed, see logs for details 

:アプリ:失敗したの構築:mergeDebugResourcesは

FAILUREをFAILED例外はある。

何が悪かったのか
  • : 実行がタスクに失敗しました ':アプリ:mergeDebugResources'。

    Error: Some file crunching failed, see logs for details

  • してみてください。スタックトレースを取得する--stacktraceオプション付き 実行します。より多くのログ出力を得るには、--infoまたは--debugオプションを指定して実行します。私はビルドフォルダを削除するが、私は同じエラーを得たenter link description here

    :3.358秒

    と、これは私のログです:

    BUILDは

合計時間を失敗しました。これらのフォルダにはPNG画像はありません。

+0

あなたの疑問にお答えします。 –

+0

あなたが投稿した行はエラーではありません。 – Henry

+0

@Henry画像を追加します –

答えて

1

は、あなたのプロジェクトをきれいに確認してください、のGradleでこれを試してみてください:

android { 
aaptOptions { 
      cruncherEnabled = false 
     } 
} 

は、この情報がお役に立てば幸いです。

+0

私は追加するが、私は同じエラーがある。 –

+0

アンドロイドタグをコピーしてaaptOptionsをコピーしてアンドロイドタグに貼り付けないでください。 –

+0

私は知っている、私はちょうどaaptOptionsをコピーします。 –

関連する問題