Overblog Tous les blogs Top blogs Entreprenariat Tous les blogs Entreprenariat
Editer l'article Suivre ce blog Administration + Créer mon blog
MENU
http://iakxg.over-blog.com/

iakxg.over-blog.com/

Publicité

Android Studio On Macos



How to install Java JDK on Mac OS X ( with JAVAHOME ) - this video we will see How to Install Android Studio on MacoS. So let's get started with the installation of Android Studio and Setting up Android Development Environment in Mac OS. If you want to install the same on Windows or Linux platform you can visit 3 Steps to Setting up Android Development Environment & Android Studio in Windows and Linux. Sometimes Android Studio gets corrupted, and when you try to compile your Android application (or launch a virtual device), everything goes haywire. Often, the solution is to completely uninstall and reinstall Android Studio. This guide will show you how to completely clean uninstall Android Studio from macOS and OS X. Question or issue on macOS: There's lots of info here (much obsolete) on installing Java on the mac, and getting Android Studio to use the right versions. But recent builds of Android Studio (2.2 and on?) provide their own Java, and for most Mac users, there's just no reason (or desire) to install a browser.

The purpose of this section is to guide you to create in your development environment an Android emulator.

Android emulators are managed through a UI called AVD Manager

AVD Manager has a nice interface when started from Android Studio.

Start Android Studio app, then create a blank project.

Go to the Tools menu -> :Android -> AVD Manager:

If no emulator has been created you should start with this screen:

Click the Create Virtual Device button.

In the Select Hardware window , select Nexus 5 as shown in the following snapshot:

Click the Next button.

In the System Image, select the system image Nougat, API Level 25 , ABI x86 :

Excel online price. Click on the download link to download the selected System Image. This download process is done through SDK Manager.

Once the download is complete, click on the Next button.

In the Verify Configuration window, check any parameter :

Then click on the Finish button.

AVD Manager shows you the newly created device:

Click on the launch button to launch the newly created AVD in the emulator.
Notice in the Run Window of Android Studio the command line used to start the device:

which can be shortened to :

How to start Android Emulator from Terminal?

Stop the emulator started by Android Studio. Open the Terminal app and type the following command:

This should start the emulator with the selected AVD.

References

The very first step to start development in React-Native is to install the right tools to setup the environment correctly. I'm working on MacOS Catalina and I already have Xcode 11 installed on my machine which is one of the pre-requisites to run the iOS App.

Install the following dependencies for React-Native:

NodeJS: https://nodejs.org/en/download/

The recommended way to install Node is using Homebrew from your Terminal:

Watchman: In react-native, Watchman watches the source code for any changes and rebuilds them.

Install XCode from App Store.

Cocoapods: This is the Dependency Manager for iOS & Mac projects.

This requires you to enter system password.

Install Visual Studio Code for Mac from here. You might face issues on Mac OS Catalina to run VS Code due to Notarization requirements. You can check out this post for more details.

Create the folder inside say your Documents folder on your Mac as below:

Open VS Code and open New Terminal and type the following command to create a new React-Native App: Call of duty black ops series.

Come back to the MyApp folder and run the below command to run your App in the iOS simulator:

This will install and launch the App in your iOS simulator. The first time might be very slow. It might be helpful to launch your simulator beforehand.

Uninstall Android Studio Completely

Running on Android:

Install the Android Studio from here, which will install the Android SDK and the required emulator. I'm using the Android 10 emulator for Pixel XL.

Android studio on mac osx

Open the MyApp folder in VS Code to make further changes.

Issues

Running the Android App causes issues while launching the Emulator. The error message is: React Native adb reverse ENOENT

Starting with macOS Catalina, your Mac uses zsh as the default login shell and interactive shell. You can make zsh the default in earlier versions of macOS as well.

So on your Mac:

1 – Open your .zshrc file:

2 – if .zshrc file doesn't exist, you need to create one & open again(Step 1)

3 – Add this to your .zshrc file

4 – Save and close

5 – Compile your changes

Android Studio On Mac Os 10.13

& make sure to restart your terminal.

Android Studio On Mac Os 10.10

Run the command in the Terminal and you'll see something like below if everything is fine:

Android Debug Bridge version 1.0.41

Version 30.0.0-6374843

Installed as /Users//Library/Android/sdk/platform-tools/adb

You can also run the code in your VS Code Terminal and see the same output.

The path to Android SDK is available in the Configure button -> SDK Manager (at the bottom right) when you launch Android Studio.





Publicité
Partager cet article
Repost0
Pour être informé des derniers articles, inscrivez vous :
Commenter cet article