GradlePluginDevelop

by UCodeUStory

UCodeUStory / GradlePluginDevelop

💍Gradle 执行流程、什么叫DSL、领域专用语言、Gradle常见用法、Gradle高级插件用法、Gradle对Android优化、结合Javassist使用给上一层楼以及Gradle开发中的遇...

439 Stars 27 Forks Last release: Not found 72 Commits 0 Releases

Available items

No Items, yet!

The developer of this repository has not created any items for sale yet. Need a bug fixed? Help with integration? A different license? Create a request here:

Gradle插件开发介绍

Gradle基础详解:

这一次一定要系统掌握,你准备好了吗?

Gradle高级插件开发

Android性能优化

问题总结

  • 1.找不到依赖库,需要在repositories中添加jcenter()
  • 2.javassist找不到jar包,就是需要javassist引入jar包
  • 3.发现生成的apk没有变化,删除了build目录重新build,仍然无变化,点击Android Studio setting 清理缓存,重新启动
  • 4.项目app修改名字报错时提示找不到项目,一般根目录.idea就可以解决
  • 5.解决Error:All flavors must now belong to a named flavor dimension.

    flavorDimensions "versionCode"
    
  • 6.Android Studio clean 时产生 Error:Execution failed for task ':app:mockableAndroidJar' > java.lang.NullPointer

    解决1. 这个问题由于更改主项目complieSdk版本导致的,只需要将所有子项目的版本更改相同即可;

    解决2. 也可以通过在

       3. Press “OK” and try to Rebuild Project again.
    

    解决3.File -> Settings -> Build, Execution, Deployment -> Build Tools -> Gradle -> Experimental 取消 Enable All test..勾选,但是mac版本没找到这个选项

    解决4. 在根目录添加

           gradle.taskGraph.whenReady {
                   tasks.each { task ->
                       if (task.name.equals('mockableAndroidJar')) {
                           task.enabled = false
                       }
                   }
           }
    
  • 7.当我们修改 compile 'com.android.support:appcompat-v7:25.0.0'版本时,会报很多value 主题找不到等错误 此时我们只需要修改compileSDK版本和这个V7后面版本一致即可

  • 8.2018/8/1遇到问题 修改项目的app为其他名字时总是报找不到app in root project 经过好多天查找最终发现了问题所在,原来是

  • Go to File -> Settings -> Build, Execution, Deployment -> Compiler 2. Add to “Command-line Options”: 这里面全部去掉就可以了

友情链接

fly803/BaseProject

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.