首页 > 解决方案 > 由于 Ubuntu 中缺少 .env 文件,Android 应用程序无法在模拟器中安装

问题描述

克隆并安装存储库后,运行npx react-native run-android返回错误

    Configure project :app
    Reading env from: .env
    **************************
    *** Missing .env file ****
    **************************
    FAILURE: Build completed with 1 failure.

    1: Task failed with an exception.
    -----------
    * Where:
    Build file '/home/test/android/app/build.gradle' line: 134

    * What went wrong:
    A problem occurred evaluating project ':app'.
    > Build Config field cannot have a null parameter

在第 134 行,没有任何内容表明构建配置字段。我认为这是我本地设置的问题。我已经检查过我有所有的 android 包并且我的路径是正确的。任何帮助,将不胜感激!

标签: linuxreact-nativeenvironment-variablesbuild.gradle

解决方案


推荐阅读