当前位置: 首页 > 知识库问答 >
问题:

在Mac m1上执行以下命令时,React native npm run android失败

拓拔德馨
2023-03-14

在Mac m1上执行以下命令时,React native npm run android失败

安装应用程序时出错。确保已设置Android开发环境:https://reactnative.dev/docs/environment-setup.

**.zshrc

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  
export PATH=/opt/homebrew/bin:$PATH  
export JAVA_HOME="/Applications/Android Studio.app/Contents/jre/jdk/Contents/Home"**

错误:命令失败:/gradlew应用程序:installDebug-PreactNativeDevServerPort=8081

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:mergeDebugResources'.
> Multiple task action failures occurred:
   > A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
      > AAPT2 aapt2-4.1.0-6503028-osx Daemon #1: Daemon startup failed
        This should not happen under normal circumstances, please file an issue if it does.
   > A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
      > AAPT2 aapt2-4.1.0-6503028-osx Daemon #0: Daemon startup failed
        This should not happen under normal circumstances, please file an issue if it does.
   > A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
      > AAPT2 aapt2-4.1.0-6503028-osx Daemon #2: Daemon startup failed
        This should not happen under normal circumstances, please file an issue if it does.
   > A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
      > AAPT2 aapt2-4.1.0-6503028-osx Daemon #4: Daemon startup failed
        This should not happen under normal circumstances, please file an issue if it does.
   > A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
      > AAPT2 aapt2-4.1.0-6503028-osx Daemon #3: Daemon startup failed
        This should not happen under normal circumstances, please file an issue if it does.
   > A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
      > AAPT2 aapt2-4.1.0-6503028-osx Daemon #5: Daemon startup failed
        This should not happen under normal circumstances, please file an issue if it does.
   > A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
      > AAPT2 aapt2-4.1.0-6503028-osx Daemon #6: Daemon startup failed
        This should not happen under normal circumstances, please file an issue if it does.
   > A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
      > AAPT2 aapt2-4.1.0-6503028-osx Daemon #7: Daemon startup failed
        This should not happen under normal circumstances, please file an issue if it does.

共有1个答案

杜英范
2023-03-14

安装emulator并设置开发环境后,在m1芯片MacBook sudo arch-x86_64 gem install ffi上创建新项目之前,请运行此命令

我在我的macbook air M1中遇到了同样的问题,这个命令解决了它,谢谢

 类似资料:
  • 我能够使用Jsch连接shell通道,然后我必须执行后续命令,我已经阅读了下面的帖子通过Jsch Shell执行多个命令 我已经试过了,如下所示 但是cmd1是UNIX服务器登录脚本,所以即使我用putty给出下面的命令 我无法在一个实例中执行所有三个,只有cmd1正在执行,因此也不能使用Jsch。 因为cmd1是用于登录的,所以通常我会在puty中执行cmd1,然后一旦登录到unix服务器,我就

  • 问题内容: 我如何在Java URLConnection中实现以下curl命令 提前致谢 问题答案: 使用URLConnection的派生类(即HttpURLConnection),您可以轻松地做到这一点。 对于

  • 我在我的代码中包括boost,cpprest和openssl,但它给我的错误像follow在android studio使用ndk我给了所有路径的目录和添加到程序它构建成功,但当我运行它时,它给我以下错误 我的cmakelist.txt是 android{compileSdkVersion 28 defaultConfig{applicationId“com.example.dell.cppadd

  • 8998 HRegionServer 8066 ResourceManager 8229 NodeManager 错误:无法从动物园管理员那里获得主地址;znode数据==null。 从hbase(main)退出后:001:0>我明白了 8998 HRegionServer

  • 问题内容: 我正在编写一个脚本来自动化Python中的某些命令行命令。目前,我正在打电话: 但是我需要在远程计算机上运行一些命令。手动地,我将使用ssh登录,然后运行命令。我将如何在Python中自动执行此操作?我需要使用(已知)密码登录到远程计算机,所以我不能只使用,我想知道是否应该使用一个模块? 问题答案:

  • 问题内容: 我有一个Excel文件,我想更新工作表中的多行。所以我写了这段代码: 我得到这个错误: 查询表达式’id = 1更新[Data14City $]中的语法错误(缺少运算符),设置B_1_1 = 0,B_1_2 = 8,B_1_3 = 17,B_1_4 = 0,其中id = 2’。 当我添加到此行时: 我收到此错误: SQL语句结束后找到的字符。 如何在Excel中执行多条语句? 谢谢 问