This time must be systematically mastered. Are you ready?
- Acquaintance Gradle and Domain Specific Languages
- Gradle version configuration
- Gradle module configuration
- Gradle plugin classification
- Gradle Android plugin content
- CompileSdkVersion minSdkVersion targetSdkVersion buildToolsVersion different
- Gradle integrate configuration version
- Gradle branch channel packaging
- Gradle configuration AndroidManifest
- Gradle Configure your source path, dynamically remove classes that do not require packaging
- Gradle Project Dependency Configuration
- Gradle lintOption·优
- lint report
- Gradle package optimization configuration
- Gradle gradle.properties Configure gradle version and buildTools version, and some constant version number
- Gradle use variantFilter modify the generated apk path, name
- Gradle configure java version
- Gradle packagingOptions Solve duplicate packages and files
- AndroidStudio common problem
- Gradle command package apk
- Gradle command line passing parameters
- Gradle Compiler dynamic generation java excellent
- Gradle create Task
- Gradle select different AndroidManifest.xml
- Gradle Order of execution
- Gradle Generate test report
- Gradle Generate interface document
- AAR generate
- jar generate
- Metaprogramming
- See all tasks commands ./gradlew tasks --all
-
-
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 } } }
-
- 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