Error:The number of method references in a .dex file cannot exceed 64K.
Learn how to resolve this issue at https://developer.android.com/tools/building/multidex.html
項目過大,方法數超出限制,這一問題有的找好久找不到問題。
解決這個問題的方法就是
在gradle中添加依賴
compile 'com.android.support:multidex:1.0.0'
然後在
defaultConfig { // 突破65535個方法限制,有風險,啓動可能會造成ANR multiDexEnabled true }
如果你用了自己的application需要繼承 MultiDexApplication
ps:自己遇到的異常總結下