2017-11-20 19 views
1

レルム:エラー:DEXにバイトコードに変換エラー:レルムアンドロイドのgetエラーで

Error:Error converting bytecode to dex: 
Cause: com.android.dex.DexException: Multiple dex files define Lio/realm/Realm$1$1; 

Congig:

apply plugin: 'realm-android' 

buildscript { 
    repositories { 
     jcenter() 
    } 
    dependencies { 
     classpath "io.realm:realm-gradle-plugin:4.2.0" 
    } 
} 

realm { 
    syncEnabled = true 
} 

    compile 'io.realm:realm-android:0.87.5' 
    annotationProcessor 'io.realm:realm-android:0.87.5' 

は私が

+0

なぜ2つのレルムの異なるバージョン? – AesSedai101

+0

なぜ** **バージョン0.87.5 **と** 4.2.0を同時に使用しているのですか? – EpicPandaForce

答えて

1

あなたは簡単に修正することができ、プロジェクトが起こっていないクリーンなプロジェクトを再構築しようとしましたこの問題は次のようになります。

apply plugin: 'realm-android' 

buildscript { 
    repositories { 
     jcenter() 
    } 
    dependencies { 
     classpath "io.realm:realm-gradle-plugin:4.2.0" 
    } 
} 

realm { 
    syncEnabled = true 
} 

//compile 'io.realm:realm-android:0.87.5' // <-- removed 
//annotationProcessor 'io.realm:realm-android:0.87.5' // <-- removed 
+0

私は依存関係は必要ありませんか? – ip696

+0

それを試してください..... – EpicPandaForce

+0

どのように?))))私は見つけるために多くの時間を費やした。ドキュメントには、私が見た例があります。0.72.JP – ip696

関連する問題