任务:app:mergeExtDexDebug在运行React Native的android应用中失败

时间:2020-06-29 13:29:19

标签: java android react-native

我正在尝试在Android模拟器上运行我的React本机应用程序。它运行了一段时间,然后给了我Expiring Daemon because JVM heap space is exhausted错误。 这是我得到的实际错误-

> Task :app:mergeExtDexDebug FAILED
ReactNativeFirebase WARNING: NPM package '@react-native-firebase/auth' depends on '@react-native-firebase/app' v7.2.1 but found v7.3.0, this might cause build issues or runtime crashes.
792 actionable tasks: 2 executed, 790 up-to-date
Expiring Daemon because JVM heap space is exhausted

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:mergeExtDexDebug'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
   > java.lang.OutOfMemoryError (no error message)

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

error Failed to install the app. Make sure you have the Android development environment set up: https://facebook.github.io/react-native/docs/getting-started.html#android-development-environment. Run CLI with --verbose flag for more details.
Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081

1 个答案:

答案 0 :(得分:0)

我也遇到了这个问题。我使用的解决方案现在位于文档here中。

您可能还希望将您的npm软件包版本固定在package.json中,以用于react-native-firebase软件包,以确保安装了正确的版本(您可能需要先删除yarn.lock文件)。