![]() ![]() Minimize the error but keep the emulator open. You should now see an error message inside your Android emulator. Inside Android studio choose your emulator that we previously created and run the project. Open the android folder located within your React Native project with Android studio. Unless you already have metro up and running, open up a terminal and move it to the root React Native project folder and start the Metro by typing: Go to the tab called "other images" and choose the API level S with the system image "arm64-v8a". Choose whatever device you want to create and press "next". Open the AVD manager and press "create Virtual Device". You should get a file path as a response. To check that you have successfully configured the variable type the following in the terminal: Save your changes and quit the file editor. Let us now configure the Android home environment variable by typing the following in a terminal assuming you are using a zsh terminal: Make sure you apply any changes before closing the SDK manager. Android SDK Command-line Tools (latest).Move to the "SDK Tools" tab and make sure you have the following marked and installed: Google APIs Intel x86 Atom System Image.Inside your SDK manager under "SDK Platforms" make sure you have checked and installed the following:Ĭheck the box called "Show Package Details" and mark and install the following below the Android 10.0 (Q) section: Open up Android Studio and then the SDK manager. This tutorial assumes you already have Android Studio installed, if not make sure you have done everything mentioned in the prerequisites section first. Open a terminal and type:īrew install -cask adoptopenjdk/openjdk/adoptopenjdk8 Rosetta terminal (see the previous section for setting up a Rosetta terminal).If you are setting up an Expo application you will still be able to use this guide to be able to use the Android emulator with Expo. This tutorial will guide you through creating a Non-Expo application React Native project. Now here is where it gets a bit trickier! This section describes the process of setting up a React Native project and connecting it to an Android Studio emulator on an Apple Mac M1. Setup React Native together with Android Studio on the Apple Mac M1 Your React Native application should now be running on your Xcode iOS emulator! Move the terminal back to the root React Native project folder and start the Metro by typing: Thereafter, move the terminal inside the "ios" folder inside the React Native project we just generated, and run: Let us now create our React Native project according to the official React Native documentation. Let us now install Cocoapods using the new Rosetta terminal. We will from now on only use this Rosetta terminal in this tutorial. For easy access drag the new Rosetta terminal to your task bar. Inside this window check the box called "Open using Rosetta", you may then close this window. Right click this terminal and press "getInfo" which will open a separate window. Since we are creating a Rosetta terminal why not call it "RosettaTerminal". ![]() Name the new terminal something memorable. Right click the terminal application and duplicate it. To create a Rosetta terminal, right click the terminal icon, press "Options" and then "show in finder". ![]() To install CocoaPods we first need to setup a Rosetta Terminal. It is now presumed that you have followed the official React Native documentation up until before installing CocoaPods. If your are struggling with installing the prerequisites I strongly recommend following the official React Native documentation up until before installing CocoaPods before comming back to this tutorial to finish up the installation. The following is needed to be able to follow this guide: This section will therefore only describe how to setup a Rosetta terminal, as well as how to install CocoaPods using the Rosetta terminal. The process of setting up React Native together with Xcode on the Apple Mac M1 should not be a problem as long as you are using a Rosetta terminal while installing CocoaPods while following the official documentation on how to set up the development environment for React Native CLI. Setup React Native together with Xcode on the Apple Mac M1
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |