React-native npm run android在Mac m1上失败



React-native npm run android在Mac m1上运行失败

安装应用程序失败。请确保您设置了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"**

错误:Command failed: ./gradlew app: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.

安装仿真器并设置好开发环境后,在m1芯片MacBook上创建新项目前运行此命令

我的macbook air M1也有同样的问题,这个命令解决了它由于

相关内容

  • 没有找到相关文章

最新更新