android - Gradle新版本和Build版本

标签 android android-studio android-gradle-plugin android-build android-build-type

我已经更新了 SDK,并且我正在使用 Android studio 2.0(预览版)。所以我认为所有的东西都足够更新了。对于我和我新创建的项目来说,一切正常。但是当我从 github 下载代码时,我总是会遇到 gradle 版本错误。

所以这有点烦人。好吧,我很佩服在导入 github 项目时 gradle 已经修复了很多东西。但是一旦发生 gradle 版本错误,有时很难知道确切原因。老实说,我对 gradle 的了解已经够多了,但我总是通过点击和试用的方法来解决它。所以我有很多困惑,我在下面作为问题发布

  1. 如何知道新的 gradle 版本是怎么回事。

  2. 如何知道新版本的gradle现在禁止哪些东西

  3. 如何知道哪些支持依赖项适用于新的 gradle 版本

  4. 如何知道哪个版本的构建工具将与 gradle 完美匹配。

我认为这些问题中有很多愚蠢的东西,我用谷歌搜索了这些问题,但最终决定问你们,因为你们可以正式和随意地澄清我。

如果你对这件事了解很深,请回答我的问题。

最佳答案

Android Gradle Build systems are software tools designed to automate the process of program compilation .

如何知道新的 gradle 版本是怎么回事。

The Android build system uses the Android Plugin for Gradle to support building Android applications with the Gradle build toolkit. The plugin runs independent of Android Studio so the plugin and the Gradle build system can be updated independently of Android Studio.

您可以鼠标悬停类路径上以检查最新版本。

enter image description here

如何知道新版gradle中哪些东西现在被禁止了

你应该检查 Android Plugin for Gradle Release Notes

对于 classpath 'com.android.tools.build:gradle:1.3.1'

  1. 修复了 ZipAlign 任务正确消费的输出 使用自定义文件名时的上一个任务。
  2. 固定 Renderscript 使用 NDK 打包。

  3. 保持对 createDebugCoverageReport 构建任务的支持。

  4. 修复了对自定义使用 archiveBaseName 属性的支持 build.gradle build> 文件。

  5. 修复了无效的ResourceType lint 参数引起的警告 在 Android 外部运行 lint 时的方法注解查找 工作室。

现在对于您的第三个和第四个问题,您应该检查手动测试。

关于android - Gradle新版本和Build版本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34717370/

相关文章:

android - 在Android Studio中添加依赖项时出错

java - 为什么依赖关系只包含在发布版本中?

java - 当我执行 Keyboard.SetShifted 时应用程序崩溃

android-studio - 如何禁用调用层次结构结果突出显示

java - OpenCV 和 Android Studio : "unfortunately app has stopped"

android - uri 未注册 http ://schemas. android.com/apk/res/android

Android Studio/com.android.support :appcompat-v7:27. 1.1 红色下划线

android - 如何在android中获取字符的Unicode

android - 这个Android程序有什么问题?

android - 我们如何反转十六进制颜色代码?