您的位置:首页 > 移动开发 > Android开发

Android 相关工具插件版本经验总结

2017-07-04 17:33 274 查看
一、Gradle version与Android Plugin Version:

官网给出这两种的关系如下:
The Android Studio build system is based on Gradle, and the Android plugin for Gradle adds several features that are specific to building Android apps. Although the Android plugin is typically updated in lock-step with Android
Studio, the plugin (and the rest of the Gradle system) can run independent of Android Studio and be updated separately.

简单来说就是:
AndroidStudio构建系统依赖于Gradle,而为了构建Android apps,Android Plugin for Gradle 新增了一些特性。而这个Plugin又是独立更新的,但也会对应着相关的Gradle版本。

1、Gradle version:
Gradle的版本在gradle-wrapper.properties文件夹中配置,如:
distributionUrl = https\://services.gradle.org/distributions/gradle-3.3-all.zip

2、Android Plugin Version:
其版本在build.gradle文件中配置,如:
buildscript {
dependencies {
classpath "com.android.tools.build:gradle:2.3.3"
}
}


其中重要的是这两个版本有对应的版本关系,如果不对应编译时就会出现问题,下图便是官网的两者版本对应关系:



二、SDK Tools && SDK Build Tools:

1、SDK Tools:
Android SDK Tools is a component for the Android SDK. It includes the complete set of development and debugging tools for Android. It is included with Android Studio.
目前最新的版本:
SDK Tools, Revision 26.0.2 (April 2017)

2、SDK Build Tools:
Android SDK Build-Tools is a component of the Android SDK required for building Android apps. It's installed in the <sdk>/build-tools/ directory.

buildToolVersion版本写在build.gradle文件中:

android {
buildToolsVersion "26.0.0"
...
}
目前最新的版本:
Build Tools, Revision 26.0.0 (June 2017)

三、SDK Platform && SDK Platform Tools:

1、SDK Platform:
To compile your application against a particular version of Android, you must use the SDK Manager to download and install the SDK Platform for that release. If you want to test your application on an emulator, you must also
download at least one System Image for that Android version.
Each platform release includes system images that support a specific processor architecture, such as ARM EABI, Intel x86 or MIPS. Platform releases also include a system image that contains Google APIs. The SDK Manager lists available
platform system images under each platform version header.
最新版本:
Android 7.1

2、SDK Platform Tools:
Android SDK Platform-Tools is a component for the Android SDK. It includes tools that interface with the Android platform, such as adb, fastboot, and systrace. These tools are required for Android app development. They're also
needed if you want to unlock your device bootloader and flash it with a new system image.
最新版本:
26.0.0 (June 2017)

参考:https://developer.android.com/studio/releases/gradle-plugin.html
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: