2016-10-24 4 views
0
Information:Gradle tasks [:app:assembleDebug] Error:Execution failed for task ':app:transformClassesWithDexForDebug'. > com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: java.lang.UnsupportedOperationExceptio 
apply plugin: 'com.android.application' 

アンドロイド{ compileSdkVersion 23 buildToolsVersion "21.1.2":Multidexは既にアプリケーションクラス</p> <p>を作成

defaultConfig { 
    applicationId "com.flikster.flikster" 
    minSdkVersion 15 
    targetSdkVersion 23 
    versionCode 1 
    versionName "1.0" 
    multiDexEnabled true 
} 
dexOptions { 
    javaMaxHeapSize "2g" 
} 
buildTypes { 
    release { 
     minifyEnabled false 
     proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
    } 
} 

}

dependencies { 
    compile fileTree(dir: 'libs', include: ['*.jar']) 
    testCompile 'junit:junit:4.12' 
    compile 'com.android.support:design:23.4.0' 
    compile 'com.android.support:appcompat-v7:24.2.1' 
    compile 'com.squareup.picasso:picasso:2.5.0' 
    compile 'com.android.support:recyclerview-v7:23.4.0' 
    compile 'com.android.support:cardview-v7:23.4.0' 
    compile 'com.joooonho:selectableroundedimageview:1.0.1' 
    compile 'com.makeramen:roundedimageview:2.2.1' 
    compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.8.0' 
    compile 'com.android.support:multidex:1.0.0' 
    compile 'com.google.android.gms:play-services:9.6.1' 
    compile 'de.hdodenhof:circleimageview:2.1.0' 
    compile 'com.makeramen:roundedimageview:2.2.1' 
    compile 'com.squareup.retrofit:retrofit:1.9.0' 
    compile 'com.squareup.okhttp:okhttp:2.3.0' 
    compile 'com.pnikosis:materialish-progress:1.5' 


} 
+0

Androidスタジオ(2.0)を再起動して、グラデーションファイルを編集したり、インスタント実行をオフにする必要はありません。 – YLS

答えて

0

を有効onCreate()でMultiDexを初期化します

public class MyApplication extends Application { 
private static MyApplication applicationContext; 
public static boolean isNotificationProcessing = false; 

public MyApplication() { 
    applicationContext = this; 
} 

@Override 
public void onCreate() { 
    super.onCreate(); 

    MultiDex.install(getBaseContext()); 



} 

} 

あなたはApplicationクラス

android:name="android.support.multidex.MultiDexApplication" 

かのonCreate(に以下の追加を拡張するすべてのクラスを持っていない場合のAndroidManifest.xml内のアプリケーションタグに線の下に追加

1

を再構築して、再度実行します)メソッドを拡張するクラスがある場合アプリケーションクラス

MultiDex.install(getBaseContext()); 
関連する問題