我在尝试使用React-native运行Android Build时遇到错误(error Failed to build the app:No package name found)

vybvopom  于 5个月前  发布在  Android
关注(0)|答案(1)|浏览(122)

我是Android新手。我克隆了一个github项目(https://github.com/Expensify/App)。我一直试图运行Android构建,但它总是失败。下面是错误消息:

> [email protected] android
> scripts/set-pusher-suffix.sh && npx react-native run-android --mode=developmentDebug --appId=com.expensify.chat.dev

warn Package react-native-flipper contains invalid configuration: "dependency.platforms.ios.project" is not allowed. Please verify it's properly linked using "react-native config" command and contact the package maintainers about this.
info Starting JS server...
info Launching emulator...
info Successfully launched emulator.

info 💡 Tip: Make sure that you have set up your development environment correctly, by running react-native doctor. To read more about doctor command visit: https://github.com/react-native-community/cli/blob/main/packages/cli-doctor/README.md#doctor

:ReactNative:Unexpected empty result of running '[node, /home/danajayi/App/node_modules/@react-native-community/cli/build/bin.js, config]' command.
:ReactNative:Running '[node, /home/danajayi/App/node_modules/@react-native-community/cli/build/bin.js, config]' command failed.

FAILURE: Build failed with an exception.

* Where:
Script '/home/danajayi/App/node_modules/@react-native-community/cli-platform-android/native_modules.gradle' line: 389

* What went wrong:
A problem occurred evaluating script.
> error Failed to build the app: No package name found. We couldn't parse the namespace from neither your build.gradle[.kts] file at /home/danajayi/App/node_modules/react-native-blob-util/android/build.gradle nor your package in the AndroidManifest at null.

* 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 6s
error Failed to install the app.

字符串

rsaldnfx

rsaldnfx1#

该错误消息表示Android构建系统找不到您的应用的包名称。
出现这种情况可能有以下几个原因:
关闭,因为此问题与CLI有关:https://github.com/react-native-community/cli此外,您可以在此处找到有关配置支持的相关信息:https://github.com/react-native-community/cli/blob/main/docs/configuration.md

相关问题