Skip to content

Latest commit

 

History

History
94 lines (73 loc) · 6.73 KB

english.md

File metadata and controls

94 lines (73 loc) · 6.73 KB

Gradle plugin development introduction

Gradle basic:

This time must be systematically mastered. Are you ready?

Gradle Advanced plug-in development

Android Performance optimization

Conclusion of issue

    1. Cannot find dependent libraries, need to add jcenter() in repositories   - 2. javassist can not find the jar package, it is necessary to javassist import jar package   - 3. Found that the generated apk did not change, delete the build directory to rebuild, still no change, click Android Studio setting to clear the cache, restart   - 4. The project app changes the name of the error message is not found when the project, the general root directory.idea can be resolved   - 5. Resolve Error: All flavors must now belong to a named flavor dimension.

      flavorDimensions "versionCode"

  • 6.Android Studio clean cause Error:Execution failed for task ':app:mockableAndroidJar' > java.lang.NullPointer

       Solution 1. This problem is caused by changing the version of the main project complieSdk. It is only necessary to change the version of all subprojects to be the same;
    

          Solution 2. You can also pass

                - 1. Go to File -> Settings -> Build, Execution, Deployment -> Compiler

                - 2. Add to "Command-line Options": -x :app:mockableAndroidJar

                - 3. Press "OK" and try to Rebuild Project again.            

          Solution 3. File -> Settings -> Build, Execution, Deployment -> Build Tools -> Gradle -> Experimental             Cancel Enable All test.. Checked, but mac version did not find this option                   Solution 4. Add in the root directory

            gradle.taskGraph.whenReady {
                    tasks.each { task ->
                        if (task.name.equals('mockableAndroidJar')) {
                            task.enabled = false
                        }
                    }
            }
    
    1. When we modify the compile 'com.android.support:appcompat-v7:25.0.0' version, it will report a lot of value   The topic could not be found error       At this point we only need to modify the compile SDK version and this version of V7 to be the same

friendship link

fly803/BaseProject