didn't find class on dexpathlist

今天因为往github上传一个项目 clone下来重新运行就报这个错误,一开始只是以为在清单文件有问题。但是却是方法超限的问题。

错误信息:Unable to instantiate application com.elgami.application.: java.lang.: Didn't find class "com.elgami.application.GlobalApplication" on path: DexPathList[[zip file "/data/app/com.elgami.-1/base.apk"],nativeLibraryDirectories=[/data/app/com.elgami.customizer-1/lib/arm, /vendor/lib, /system/lib]] (复制别人的错误信息)。解决办法添加multiDexEnabled

在defaultConfig 添加 multiDexEnabledtrue;

添加依赖 compile'com.android.support:multidex:1.0.0'

OK,解决!

链接:https://stackoverflow.com/questions/34393698/didnt-find-class-on-path-dexpathlist

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • Spring Cloud为开发人员提供了快速构建分布式系统中一些常见模式的工具(例如配置管理,服务发现,断路器,智...
    卡卡罗2017阅读 135,269评论 19 139
  • afinalAfinal是一个android的ioc,orm框架 https://github.com/yangf...
    passiontim阅读 15,642评论 2 45
  • 每个人都经历过非常多的事情,所以每个人都有糗事。你不信?我给你举个典型的例子看看你就知道了。 一天,妈妈和舅舅在看...
    淡定ed阅读 254评论 1 1
  • 想到发疯
    UglyMe阅读 531评论 0 0
  • UIView*showView = [[UIViewalloc]initWithFrame:CGRectMake(...
    流沙3333阅读 291评论 0 0