【问题标题】:react-native: how to update to build tools 23.0.2?react-native:如何更新构建工具 23.0.2?
【发布时间】:2017-08-01 05:36:29
【问题描述】:

在构建生产、签名、apk 时,我注意到输出中有这些行:

Running dex in-process requires build tools 23.0.2.
For faster builds update this project to use the latest build tools.

我(想)记得必须拥有 23.0.1 版本的 android 构建工具。

我必须做什么来更新项目?

更新

我卸载了 build-tools 23.0.1 并安装了 23.0.3。

然后我按照 sfratini 的建议更新了 build.gradle 文件,但我在构建时得到了这个:

Checking the license for package Android SDK Build-Tools 23.0.1 in C:\Users\realtebo\AppData\Local\Android\Sdk\licenses 
License for package Android SDK Build-Tools 23.0.1 accepted. 
Preparing "Install Android SDK Build-Tools 23.0.1".

当然,使用lastest build-tool的建议消失了,但我不明白为什么旧的build-tool会自动强制安装。

【问题讨论】:

  • 您在 android studio 中是否从其他 3rd 方包(如 react-native-vector-icons)获得了任何其他项目?他们可能仍会默认指向构建工具 23.0.1。

标签: react-native react-native-android build-tools


【解决方案1】:

到目前为止,我实际上使用的是 23.0.3,没有任何问题。只需更新您的 gradle 文件:

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.3"

如果您将光标放在版本上,AS 甚至可能会提示您更新版本。

【讨论】:

  • 我按照你的建议更改了 build,gradle,但在下一次运行 gradlew 时它重新下载并重新安装了 23.0.1。
  • Checking the license for package Android SDK Build-Tools 23.0.1 in C:\Users\realtebo\AppData\Local\Android\Sdk\licenses License for package Android SDK Build-Tools 23.0.1 accepted. Preparing "Install Android SDK Build-Tools 23.0.1".
  • @realtebo 另一个组件或模块可能有它作为要求。查找所有其他 gradle 文件并检查是否某些模块需要该特定版本。
猜你喜欢
  • 2016-01-14
  • 2015-07-17
  • 2016-05-30
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2017-03-28
相关资源
最近更新 更多