2017-12-31 43 views
1

ASはOエミュレート、私は以下のエラーを示しています。エラー:実行は「タスクに失敗しました:アプリ:私が作るプロジェクトのしようとするとtransformClassesWithMultidexlistForDebug

私は

私descriptedエラーを表示したときに、ASの画像を添付します ​​

IMAGE

これは私のbuild.gradleで、私はそれがすべてのエラー

apply plugin: 'com.android.application' 

android { 
    compileSdkVersion 26 
    buildToolsVersion "26.0.2" 
    defaultConfig { 
     applicationId "codingwithmitch.com.googlemapsgoogleplaces" 
     minSdkVersion 16 
     targetSdkVersion 26 
     versionCode 1 
     versionName "1.0" 
     multiDexEnabled true 
     testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 
    } 
    buildTypes { 
     release { 
      minifyEnabled false 
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
     } 
    } 
    packagingOptions { 
     exclude 'META-INF/DEPENDENCIES' 

    } 
} 

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:26.1.0' 
    compile 'com.android.support:multidex:1.0.2' 
    compile 'com.android.volley:volley:1.1.0' 
    compile 'com.android.support.constraint:constraint-layout:1.0.2' 
    testCompile 'junit:junit:4.12' 
    compile group: 'org.apache.httpcomponents' , name: 'httpclient-android' , version: '4.3.5.1' 
    compile (group: 'org.apache.httpcomponents' , name: 'httpmime' , version: '4.3.5') { 
     exclude module: 'org.apache.httpcomponents:httpclient'} 


    //Google play services 
    compile 'com.google.android.gms:play-services:11.4.0' 
} 
を持って知っていません

thnks

+0

を可能な重複[取得中のエラー:タスクappの実行に失敗しました:transformClassesWithMultidex listForDebug](https://stackoverflow.com/questions/37906750/getting-error-execution-failed-for-task-apptransformclasseswithmultidexlistfor) – ADM

答えて

-1

trueにその値を変更することにより、build.gradleファイルにmultidexを有効にする - また、あなたがあなたのApplicationクラスでこれを含める必要が

android { 
    compileSdkVersion 22 
    buildToolsVersion "23.0.0" 

     defaultConfig { 
      minSdkVersion 14 //lower than 14 doesn't support multidex 
      targetSdkVersion 22 

      // Enabling multidex support. 
      multiDexEnabled true 
     } 
} 

dependencies { 
    //need to add multidex dependency 
    compile 'com.android.support:multidex:1.0.1' 
} 

public class Application extends MultiDexApplication { 

    @Override 
    protected void attachBaseContext(Context base) { 
     super.attachBaseContext(base); 
     MultiDex.install(this); 
    } 

} 

Reference

+0

それは今動作していますか? –

+0

これがどのように修正されるのか分かりません。IOException:[H:\ Server..' –

関連する問題