android 编译的问题集合与解决方案

butterknife 8.0以上的版本报空指针异常

  • 开始添加的内容

    compile 'com.jakewharton:butterknife:8.8.1' 
    compile 'com.jakewharton:butterknife-compiler:8.8.1'
    或者修改成
    apt 'com.jakewharton:butterknife-compiler:8.8.1'
    
image.png
  • 修改成annotationProcessor 可以正常运行

    compile 'com.jakewharton:butterknife:8.8.1'
    annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
    


Error:com.android.builder.dexing.DexArchiveBuilderException

image.png

android studio 在Vivo与oppo上无法Debug运行调试,报解析包异常

  • 解决方案 gradle.properties 中添加

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

推荐阅读更多精彩内容