Error:Execution failed for task ':ttt:transformClassesWithDexForDebug'.com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.dex.DexIndexOverflowException: method ID not in [0, 0xffff]: 65536

解决办法:谷歌官方推荐使用MultiDexApplication

Gradle 配置:
defaultConfig {          applicationId "XXX"       minSdkVersion 14       targetSdkVersion 23       multiDexEnabled true}dependencies {    compile 'com.android.support:multidex:1.0.0'}

Application 类重写方法:

@Overrideprotected void attachBaseContext(Context base) {   super.attachBaseContext(base);   MultiDex.install(this);}


更多相关文章

  1. Android使用SurfaceView画图
  2. Android学习笔记(12)————利用SQLiteOpenHelper来管理SQLite
  3. Android(安卓)中保存图片的代码
  4. Ubuntu 12.04.5 LTS下配置android4.4编译环境
  5. AlarmManager定时重复任务,发送心跳
  6. 图片裁剪关于return-data
  7. Android:Activity:打开另外的Activity、参数传递
  8. Android(安卓)之gson字符串转java bean
  9. 使用Intent实现页面跳转 (另一种方法)

随机推荐

  1. 基于 Android(安卓)NDK 的学习之旅-----
  2. SEAndroid和普通android的区别
  3. Android用户界面设计:布局基础
  4. Android(安卓)上,用普通的 am-linux-gcc
  5. Android(安卓)5.0+ 自定义普通按钮的ripp
  6. u3d与android通信1
  7. Android自动接听和挂断电话实现原理
  8. android与Web服务器交互时的cookie使用-
  9. Android(安卓)Developers:向其它应用发送
  10. android Paint和Color类介绍 使用示例