reactjs - 如何修复构建 gradle asemble 版本在 react native 0.59 中失败
问题描述
我想生成我的项目反应原生,但我有一些问题
它在我的 Android 的 sdk 版本中
>
> Configure project :react-native-vector-icons
WARNING: The specified Android SDK Build Tools version (28.0.2) is ignored, as it is below the minimum supported version (28.0.3) for Android Gradle Plugin 3.3.1.
Android SDK Build Tools 28.0.3 will be used.
To suppress this warning, remove "buildToolsVersion '28.0.2'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.
> Task :app:bundleReleaseJsAndAssets FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Failed to capture fingerprint of input files for task ':app:bundleReleaseJsAndAssets' property '$1' during up-to-date check.
> Could not list contents of '/Users/halojasa/halojasa_com/node_modules/node-pre-gyp/node_modules/.bin/detect-libc'. Couldn't follow symbolic link.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/4.10.1/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 2s
85 actionable tasks: 1 executed, 84 up-to-date
现在我无法发布我的应用程序,请有人帮助我。. . .
解决方案
将这些行添加到android/build.gradle
所有项目代码中
subprojects {
afterEvaluate {project ->
if (project.hasProperty("android")) {
android {
compileSdkVersion 28
buildToolsVersion "28.0.2"
}
}
}
}
allprojects {
...all project stuff...
}
推荐阅读
- swift - SwiftUI 预览 - 意外数据
- websocket - 连接中断时,ktor websocket 客户端不会收到通知
- async-await - 在等待的函数之前执行具有等待的函数
- json - 使用 Pyspark 将 JSON 读取为数据框
- bash - 在 Jupyter 中通过 BASH 脚本设置环境变量
- python - 错误:找不到满足 django-haystack==2.8.1 要求的版本
- javascript - 在网站上并排显示两个表格
- nativescript - 导航之间的背景颜色
- windows - 是否有关于“microsoft-edge-holographic”和“ms-xbl-3d8b930f”uri 协议的文档?
- c++ - 为什么 C++ 模板类可以访问其基类的私有成员?