【发布时间】:2021-06-05 17:47:23
【问题描述】:
我正在使用 ./gradlew assembleRelease 导出我的 react 本机文件。
我收到以下错误:
-
此版本中使用了已弃用的 Gradle 功能,使其与 Gradle 7.0 不兼容
-
未找到 SDK 位置
我的 gradle 是否与我安装的 Java 版本不兼容?我似乎找不到解决方法?
以下完全错误
------------------------------------------------------------
Gradle 6.3
------------------------------------------------------------
Build time: 2020-03-24 19:52:07 UTC
Revision: bacd40b727b0130eeac8855ae3f9fd9a0b207c60
Kotlin: 1.3.70
Groovy: 2.5.10
Ant: Apache Ant(TM) version 1.10.7 compiled on September 1 2019
JVM: 1.8.0_291 (Oracle Corporation 25.291-b10)
OS: Mac OS X 10.16 x86_64
* What went wrong:
Could not determine the dependencies of task ':app:compileReleaseJavaWithJavac'.
> SDK location not found. Define location with an ANDROID_SDK_ROOT environment variable or by setting the sdk.dir path in your project's local properties file at '/Users/mattlaszcz/Documents/HearthNative/HearthNative/android/local.properties'.
* 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.3/userguide/command_line_interface.html#sec:command_line_warnings
【问题讨论】:
-
如有必要,我可以提供完整的堆栈跟踪。
标签: react-native gradle sdk