0

Iができないgradleとなっerror.I'mはアンドロイドスタジオ3.0の安定版を使用して構築する取得DEXマージ問題が3.0

Error:Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'. com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex

詳細:

Information:Gradle tasks [clean, :app:assembleDebug] 
Error:Execution failed for task 
':app:transformClassesWithMultidexlistForDebug'. 
> java.io.IOException: Can't write [D:\Studio Projects\SampleMVP 
\app\build\intermediates\multi-dex\debug\componentClasses.jar] (Can't read [D:\Studio Projects\SampleMVP\app\build\intermediates\transforms\desugar\debug\13.jar(;;;;;;**.class)] (Duplicate zip entry [13.jar:android/support/v4/view/ViewPager$1.class])) 
Information:BUILD FAILED in 4m 6s 
Information:1 error 
Information:0 warnings 
Information:See complete output in console 

マイapp gradle

apply plugin: 'com.android.application' 

android { 
compileSdkVersion 27 
buildToolsVersion "27.0.0" 
defaultConfig { 
    applicationId "ocs.com.samplemvp" 
    minSdkVersion 15 
    targetSdkVersion 27 
    versionCode 1 
    versionName "1.0" 
    testInstrumentationRunner 
"android.support.test.runner.AndroidJUnitRunner" 
    multiDexEnabled true 
} 
buildTypes { 
    release { 
     minifyEnabled false 
     proguardFiles getDefaultProguardFile('proguard-android.txt'), 
'proguard-rules.pro' 
    } 
} 
dataBinding { 
    enabled = true 
} 


compileOptions { 
    sourceCompatibility JavaVersion.VERSION_1_8 
    targetCompatibility JavaVersion.VERSION_1_8 
} 
} 

dependencies { 
implementation fileTree(include: ['*.jar'], dir: 'libs') 
//noinspection GradleCompatible 
implementation 'com.android.support:appcompat-v7:27.0.0' 
implementation 'com.android.support.constraint:constraint-layout:1.0.2' 
testImplementation 'junit:junit:4.12' 
androidTestImplementation 'com.android.support.test:runner:1.0.1' 
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1' 
} 

は、私は多くの時間をきれいにしようとしたし、それを再構築プロジェクトをきれいにし、プロジェクトの再構築

2.を再構築しますが

+0

参照[ここ](https://stackoverflow.com/questions/46267621/unable-to-merge-dex) –

答えて

0

1.あなたはアンドロイドスタジオのメニューから[キャッシュ/ restratを無効にすることができない場合は、プロジェクトを再構築...

2.はそれを再構築プロジェクトを清掃してください。

3./projectディレクトリに/buildディレクトリを削除し、/project/app/ディレクトリから/buildディレクトリを削除し、プロジェクトを作り直します。アンドロイドスタジオのメニューから

5.はキャッシュ/ restratを無効に... 4.あなたはすでに、アプリケーションがそれをアンインストールした場合。

Unable to merge dex

+1

アプリを再構築するお手伝いをすることができます** 27.1.0 **からのダウングレードサポートlibバージョン** 26.1.0 **とありがとうすべて –

+0

これらの手順を実行しましたか? – Nawrez

+0

はい私はそれに続いてダウングレードの後 –

0

1.を働いていません。

3./projectディレクトリに/buildディレクトリを削除し、/project/app/ディレクトリから/buildディレクトリを削除し、プロジェクトを作り直します。

4.すでにアプリケーションをインストールしている場合は、アンインストールしてください。

+0

私はできない私私の問題が修正され –

関連する問題