zoukankan      html  css  js  c++  java
  • 方法数超过65536上限

    报错

    原因:

    方法数超过65536的上限

    解决方案:

    android {  
        compileSdkVersion 21  
        buildToolsVersion "21.1.0"  
      
        defaultConfig {  
            ...  
            minSdkVersion 14  
            targetSdkVersion 21  
            ...  
      
            // Enabling multidex support.  
            multiDexEnabled true  
        }  
        ...  
    }  
      
    dependencies {  
      compile 'com.android.support:multidex:1.0.0'  
    }  

    1.导入jar包

    2.设置multiDexEnabled属性为true

    3.Application类集成MultiDexApplication类或者如下(推荐)

    public class MyApplication extends FooApplication {  
        @Override  
        protected void attachBaseContext(Context base) {  
            super.attachBaseContext(base);  
            MultiDex.install(this);  
        }  
    }  

     

  • 相关阅读:
    mexopencv
    Computer Vision Resources
    Immersive Imaging
    汇编指令
    I/O输入系统
    大容量存储器的结构
    文件系统实现
    文件系统接口
    虚拟内存
    内存管理
  • 原文地址:https://www.cnblogs.com/anni-qianqian/p/6511054.html
Copyright © 2011-2022 走看看