I should understand the problem by just seeing
dex errors
But it took a half day to fix the issue.
I fix this by following android developers page’s instruction:https://developer.android.com/studio/build/multidex.html
First add this to gradle.build file :
defaultConfig { ... minSdkVersion 14 targetSdkVersion 21 ... // Enabling multidex support. multiDexEnabled true } dependencies { compile 'com.android.support:multidex:1.0.0' }Then extend Application class (or declare the application class in
AndroidManifest.xmlor override
attachBaseContext()function with the
MultiDexApplicationclass as instructed on the above link.
That’s all and it solved the problem.