解决com.android.dex.DexException: Multiple dex files define Lcom/google/gson/JsonSerializer;

我在开发Windows Azure的Mobile Service(隔天补上建立过程)的安卓客户端时,报出了com.android.dex.DexException: Multiple dex files define Lcom/google/gson/JsonSerializer;这个错误,如图android

出现相似Mutiple dex files这类错误的通常都是有重复的库添加了进去,反复的找,原来本身手贱把一个jar包先放进了项目的libs里面,而后又在gradle里面写下gradle

compile 'com.google.code.gson:gson:2.3'

添加剧复啦~不过,在debug的过程当中看见一个stackoverflow上面有个挺好玩的相关问题,也贴在这里:http://stackoverflow.com/questions/22468700/unexpected-top-level-exception-com-android-dex-dexexception-multiple-dex-files google

这个的总体思路也是包添加剧复,只不过更怪异点,明天再写,睡觉去~debug

相关文章
相关标签/搜索