zoukankan      html  css  js  c++  java
  • gradle中的compileSdkVersion和buildToolsVersion

    CompileSdkVersion:编译版本,就是运行这个项目需要的SDK,即API Level。

    buildToolsVerson:是构建工具的版本,构建工具包括了打包工具aapt、dx等等。

    注意:
    1、buildtools的目录位于 android_sdk_path/built-tools/XXX。这个版本号一般是API—-LEVEL.0.0。
    2、eclipse的project.properties中可以设置sdk.buildtools,也可以不设置,默认是指定最新版本。而在Android studio中是必须在build.gradle中设置。

        /**
         * android 编译基本环境配置
         */
        compileSdkVersion = 26
        buildToolsVersion = "26.0.0"
    

    3、buildToolsVersion的版本需要>=CompileSdkVersion,可以用高版本的build-tool去构建一个低版本的sdk工具,例如:

        /**
         * android 编译基本环境配置
         */
        compileSdkVersion = 23
        buildToolsVersion = "26.0.0"
    

    附录-SDK目录:

    ➜  sdk ls
    build-tools    extras         patcher        platforms      tools
    emulator       licenses       platform-tools sources
    

    关键目录:

    • platforms:是存在不同API-LEVEL版本SDK目录的地方
    • build-tools:里面是不同版本的build工具,这些工具包括了aapt打包工具、dx、aidl等。
    • platform-tools:是一些Android平台相关的工具,如adb、fastboot、sqlite3等
    • tools:是存放一些Android开发相关的工具,如android、emulator、monitor、traceview
  • 相关阅读:
    从汇编看c++中的placement operator new
    从汇编看c++的new和delete
    从汇编看c++中全局对象和全局变量
    javascript中的this
    好工具
    js压缩解压工具
    IE的documentMode属性
    77. sqlserver 锁表解决方式
    75. ID重新走过,备份表
    5. Java中序列化的serialVersionUID作用
  • 原文地址:https://www.cnblogs.com/amyzhu/p/9125964.html
Copyright © 2011-2022 走看看