[Android Development] Gradle

Gradle

Android mainstream compilation tools

There are two gradles in the project:

  • setting.gradle: Record which modules should be recorded to the compilation process
  • build.gradle: The configuration inside will be applied to all projects
  • Each module in the project has its own build.gradle: the configuration of the current module will override the configuration of build.grandle in the project

Part of the configuration in Gradle:

  • minSdkVersion: Minimum API level
    • If the mobile device API version is lower than this version, the mobile phone cannot install this application
    • APIs higher than this API level cannot be used in the project
    • The API level of the library used should be less than the version of the project
  • compileSdkVersion: the compiled SDK version
  • targetSdkVersion: target version
    • The main basis for forward compatibility
    • There may be some differences when the same application runs on different devices, which is used to prohibit the compatibility differences between different SDK versions
  • dependencies: dependent configuration

Guess you like

Origin blog.csdn.net/weixin_42020386/article/details/112728074