cli icon indicating copy to clipboard operation
cli copied to clipboard

Issues opening Android Studio in M1 Macbook Pro

Open mrarslanark opened this issue 4 years ago • 1 comments

Environment

System: OS: macOS 11.6 CPU: (8) x64 Apple M1 Memory: 786.74 MB / 16.00 GB Shell: 5.8 - /bin/zsh Binaries: Node: 14.18.1 - /usr/local/bin/node Yarn: 1.22.17 - /usr/local/bin/yarn npm: 8.1.1 - /usr/local/bin/npm Watchman: 2021.10.18.00 - /opt/homebrew/bin/watchman Managers: CocoaPods: 1.11.2 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: iOS 15.0, DriverKit 20.4, macOS 11.3, tvOS 15.0, watchOS 8.0 Android SDK: API Levels: 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 7, 8, 9 Build Tools: 29.0.2, 30.0.2, 31.0.0 System Images: android-31 | Google Play Intel x86 Atom_64 Android NDK: Not Found IDEs: Android Studio: 2020.3 AI-203.7717.56.2031.7784292 Xcode: 13.0/13A233 - /usr/bin/xcodebuild Languages: Java: 1.8.0_292 - /usr/bin/javac npmPackages: @react-native-community/cli: Not Found react: 17.0.1 => 17.0.1 react-native: 0.64.2 => 0.64.2 react-native-macos: Not Found npmGlobalPackages: react-native: Not Found

Description

When I open Android Studio from my dock or directly by clicking on the icon, it gives the following error

Caused by: java.io.IOException: Cannot run program "node" (in directory "/Users/arslanmushtaq/Desktop/projects/tempo/react-native-client/android"): error=2, No such file or directory

and when I open the terminal and enter the following command:

open -a /Applications/Android\ Studio.app

It detects the node directory and starts syncing and building the project and later on the issue is resolved but the problem exists for every initial run of every react-native project

Reproducible Demo

Follow the steps for creating the reproducible demo

Pre-requisites: You should have an M1 Macbook with iTerm Rosetta Enabled

  1. Create a new react-native-cli project
  2. Open the project in Android Studio (NOT FROM TERMINAL)

mrarslanark avatar Oct 26 '21 09:10 mrarslanark

facing the same issue +1... thanks for the tempory solution.

Mian442 avatar Oct 26 '21 09:10 Mian442

There hasn't been any activity on this issue in the past 3 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 7 days.

github-actions[bot] avatar Nov 26 '22 03:11 github-actions[bot]