简体   繁体   English

当我尝试执行以下代码时,我的 react-native 应用程序出现错误

[英]I get error on my react-native app while I am trying to execute following code

FAILURE: Build failed with an exception. FAILURE:构建失败并出现异常。

  • What went wrong: Task 'installDebug' not found in project ':app'.出了什么问题:在项目“:app”中找不到任务“installDebug”。

  • Try: Run gradlew tasks to get a list of available tasks.尝试:运行 gradlew 任务以获取可用任务列表。 Run with --stacktrace option to get the stack trace.使用 --stacktrace 选项运行以获取堆栈跟踪。 Run with --info or --debug option to get more log output.使用 --info 或 --debug 选项运行以获得更多日志 output。 Run with --scan to get full insights.运行 --scan 以获得完整的见解。

  • Get more help at https://help.gradle.orghttps://help.gradle.org获得更多帮助

Setup the Environment before running the command在运行命令之前设置环境

Follow these instructions按照这些说明

brew install node

brew install watchman

brew cask install adoptopenjdk/openjdk/adoptopenjdk8

Download and install Android Studio下载并安装 Android Studio

Choose a "Custom" setup when prompted to select an installation type.当提示 select 安装类型时,选择“自定义”设置。 Make sure the boxes next to all of the following are checked:确保选中以下所有选项旁边的框:

  1. Android SDK Android SDK
  2. Android SDK Platform Android SDK平台
  3. Performance (Intel ® HAXM)性能(英特尔® HAXM)
  4. Android Virtual Device Android 虚拟设备

Add the following lines to your $HOME/.bash_profile or $HOME/.bashrc config file:将以下行添加到您的 $HOME/.bash_profile 或 $HOME/.bashrc 配置文件中:

export ANDROID_HOME=$HOME/Library/Android/sdk
export PATH=$PATH:$ANDROID_HOME/emulator
export PATH=$PATH:$ANDROID_HOME/tools
export PATH=$PATH:$ANDROID_HOME/tools/bin
export PATH=$PATH:$ANDROID_HOME/platform-tools 

You can also refer the official Docs here您也可以参考官方文档here

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 我试图通过遵循文档将someignal配置到我的react-native应用程序中,但它显示了@override的错误 - I am trying to configure onesignal into my react-native app by following the documentation but it shows and error of @override 打开我的 react-native 应用程序时出现此错误。 有什么建议么? - I am getting this error while opening my react-native app . Any suggestions? 每当我尝试将选项卡导航添加到我的 react-native 应用程序时,我都会收到以下错误“(0,_reactNavigation.TabNavigator)不是函数” - I get the following error “(0 , _reactNavigation.TabNavigator) is not a function” any time I try to add tab navigation to my react-native app 我正在尝试构建 apk,但在 react-native 中出现此错误 - i am trying to build apk but i get this error in react-native ling react-native 我收到以下错误(在 Windows 上)? - ling react-native I get the following error (on windows)? 在 react-native 中获取数据时出现错误 - I am getting error while fetching data in react-native 在 android 工作室中运行 react-native 应用程序时出现此错误 - I am getting this error while running react-native app in android studio 在使用 expo build:android 构建 react-native 应用程序时,我收到 MaxListenersExceededWarning 错误 - while building react-native app using expo build:android i am getting MaxListenersExceededWarning error 我正在尝试构建 react native 应用程序,但出现此错误:react native version mismatch expo - I am trying to build react native app and I get this error: react native version mismatch expo 我正在尝试从 React-Native 应用程序中的数据库中获取我的数据 - I'm trying to get my data from database in React-Native app
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM