【问题标题】:Error message when launching android emulator启动android模拟器时出现错误消息
【发布时间】:2021-01-18 20:59:28
【问题描述】:

我尝试在终端上使用 npx react-native run-android 在 React Native 中启动我的应用程序,但发生了这个错误

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_warning 
Picked up _JAVA_OPTIONS: -Xmx512M        

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.        
-----------
* Where:
Build file 'C:\Users\mikae\Desktop\AppDentista\android\app\build.gradle' line: 87

* What went wrong:
A problem occurred evaluating project ':app'.
> Could not read script 'C:\Users\mikae\Desktop\AppDentista\node_modules\expo-updates\scripts\create-manifest-android.gradle' as it does not exist.

* 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.
==============================================================================

2: Task failed with an exception.
-----------
* What went wrong:
A problem occurred configuring project ':app'.
> compileSdkVersion is not specified.

* 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 45s

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
Picked up _JAVA_OPTIONS: -Xmx512M

我想在 Android 模拟器上启动并安装我的应用程序,但我尝试时总是会出现此错误。这表示缺少某些东西,但我不知道是什么。我在互联网上的其他地方没有发现与我相同的问题

【问题讨论】:

    标签: javascript android react-native gradle


    【解决方案1】:

    如果你有同样的问题,我已经得到了。您是否需要再次安装所有依赖项(Android Studio、React 和 Java)。之后,用npx react-native init Project创建一个项目,完成!

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-09-03
      • 2011-03-22
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-09-23
      相关资源
      最近更新 更多