react-native - 我如何构建 react-native 应用程序以避免导致失败的许多重大更改?
问题描述
我刚刚使用已成功创建的 npx create-react-native-app myapp 创建了一个新的 react-native 应用程序。但是当我尝试使用 gradlew assembleRelease 构建它时,我收到了这个错误
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':app:compileReleaseJavaWithJavac'.
> Failed to find Platform SDK with path: platforms;android-30
* 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 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.8/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 43s
似乎有一个gradle问题。我如何解决它?
解决方案
我发现构建反应原生应用程序的完美方法是使用命令“assembleRelease”。这会构建您的代码并为您提供一个 apk
推荐阅读
- c++ - 如何将结构定义为结构的成员?
- httpclient - ning.http.client Kerberos 示例
- python - pandas:索引值数组中的系列值
- python - Spark DF pivot 错误:方法 pivot([class java.lang.String, class java.lang.String]) 不存在
- javascript - 如何使用 IE11 和 certenroll 向 PKCS10 证书请求添加 challengePassword?
- javascript - 检测图像上/外部的点击不起作用
- c++ - hello world 示例,用于在 C 中使用 SSL 的猫鼬网络服务器
- aerospike - 如何在 aerospike nodejs 客户端中运行多个谓词映射键过滤器?
- django - 在 Django 中动态从 view.py 中的引导手风琴菜单获取数据
- typescript - 删除函数不带参数值