相同的sources。。。出現了問題就build 不到apk, 整個人orz 了。。。。
找了好幾個論壇，終於找到了原因，更改了Google Services 的lib 換成了只用 Google Services -GCM, 就好了。。。
Unable to build apk: The number of method references cannot exceed 64K occur when app .dex file have more than 65,536 methods.
Exceed 65K Method that means method count more than 65,536 methods There are different ways to fix it:
1. Reduce dependencies in your project put dependencies in gradle which are required
Most problems that I found from another developers is use Google Play Services in them project like this.
So the best way is choosing only some dependencies in Google Play Services that you really want to use it.
2. Set minimum SDK version to 21 or higher
Why it worked when change minimum SDK to 21? That's because of Android 5.0 or higher are use ART (Android Runtime) that supported MultiDex instead of Dalvik. So ART can support more than 65,536 methods.
3. Use Proguard to reduce useless method
4. Use MultiDex
But these are the Limitation of MultiDex library
• May occurs ANR while app launching if .dex files too large.
• Should be define minimum SDK to version 14 or higher.
• MulitDex uses more memory and may crash while app running if allocation memory is over limit.
• Take more build time when you build the project