在Android Studio中使用greenDao,编译时会报错android
Gradle抛出部分异常以下gradle
com.android.dex.DexException: Multiple dex files define
使用:ui
gradlew -q dependencies
能够看到greenDao中引用了support.v4,若是此版本和你当前使用的版本不一致即会引起该异常。spa
解决办法:code
在build.gradle中指定greenDao去除部分依赖:ip
compile('de.greenrobot:greendao:1.3.0') { exclude module: 'support-v4' }