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

vybvopom  于 2024-01-04  发布在  Android
关注(0)|答案(1)|浏览(485)

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

  1. > [email protected] android
  2. > scripts/set-pusher-suffix.sh && npx react-native run-android --mode=developmentDebug --appId=com.expensify.chat.dev
  3. 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.
  4. info Starting JS server...
  5. info Launching emulator...
  6. info Successfully launched emulator.
  7. 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
  8. :ReactNative:Unexpected empty result of running '[node, /home/danajayi/App/node_modules/@react-native-community/cli/build/bin.js, config]' command.
  9. :ReactNative:Running '[node, /home/danajayi/App/node_modules/@react-native-community/cli/build/bin.js, config]' command failed.
  10. FAILURE: Build failed with an exception.
  11. * Where:
  12. Script '/home/danajayi/App/node_modules/@react-native-community/cli-platform-android/native_modules.gradle' line: 389
  13. * What went wrong:
  14. A problem occurred evaluating script.
  15. > 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.
  16. * Try:
  17. > Run with --stacktrace option to get the stack trace.
  18. > Run with --info or --debug option to get more log output.
  19. > Run with --scan to get full insights.
  20. * Get more help at https://help.gradle.org
  21. BUILD FAILED in 6s
  22. 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

相关问题