【问题标题】:Ejected from Expo Error - SDK location not found从 Expo 错误中弹出 - 未找到 SDK 位置
【发布时间】:2021-04-13 16:29:09
【问题描述】:

我正在制作我的第一个 react 原生应用,我不得不退出 Expo 以添加应用购买。

我收到以下错误,不太确定运行时该怎么做:

react-native run-android

我尝试将“C:\Users\Marc\AppData\Local\Android\Sdk”添加为 PATH 环境变量,但没有解决问题

对接下来要尝试什么有什么想法吗?

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

FAILURE: Build failed with an exception.

* Where:
Build file 'C:\Users\Marc\Desktop\Swig\node_modules\react-native-reanimated\android\build.gradle' line: 89

* What went wrong:
A problem occurred configuring project ':react-native-reanimated'.
> 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 'C:\Users\Marc\Desktop\Swig\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

BUILD FAILED in 1m 24s

error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup. Run CLI with --verbose flag for more details.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081

【问题讨论】:

    标签: react-native expo


    【解决方案1】:

    我已将地址添加到 PATH 变量中,而不是自己的

    https://reactnative.dev/docs/environment-setup

    【讨论】:

      猜你喜欢
      • 2022-08-02
      • 2016-12-17
      • 2018-05-18
      • 2015-11-17
      • 2020-10-30
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多