![]()
$ sdkmanager -install "platform-tools" "platforms android-29" "build-tools 29.0.2" "emulator" UNZIP ANDROID INSTALLThe basic packages you should install are, platform-tools, platforms android-29, build-tools 29.0.2, emulator. To install the package you want, just copy the package name and install: $ sdkmanager -install "package_name" Use the following command to list all the available sdks, platform-tools, build tools, emulator, ndks and what-not. If you’ve reached this step, congratulations, the journey ahead is clean and simple. If the probrem persists, feel free to drop in a comment. If not you can go through the guide and check if you’ve followed the steps carefully. If you see the following progressbar, your tools have setup successfully: 6% Fetch remote repository. UNZIP ANDROID CODEbash_profile in you preffered terminal file editor (nano or vim) and add the following code at the end of the file: export ANDROID_HOME=$HOME/android export PATH=$ANDROID_HOME/cmdline-tools/tools/bin/:$PATH export PATH=$ANDROID_HOME/emulator/:$PATH export PATH=$ANDROID_HOME/platform-tools/:$PATHĪfter adding the code, save the file, close the terminal window and open a new terminal window (I prefer this way as it makes reloading easier, without extra commands).Īfter you’ve opened a new terminal window just type the following command and hit return/enter. Now before we can add tools to path we have to add $ANDROID_HOME to the path, to do that just open the. bash_profile where as for the newer zsh terminals it’s. The file in which you have to append the PATH of the tools is in your home directory ~. $PATH is used to tell the terminal where the binaries are to be located, that are defined by user. ![]() If you don’t have any experience with the environment variable $PATH, this guide will probably give you a start. UNZIP ANDROID ANDROIDLast command will probably give you a warning, but you don’t need the worry about that.Īfter running the commands above the new directory structure should look like something like this: android └── cmdline-tools └── tools ├── NOTICE.txt ├── bin ├── lib └── source.properties Step 3 - Adding tools to $PATH. In the android directory: $ cd cmdline-tools $ mkdir tools $ mv -i * tools The above created android directory will act as our $ANDROID_HOME so other libraries can access is from the environment variables we’re going to add ahead.Īfter unzipping the content, you will get a directory named cmdline-tools, now follow the next steps carefully. Now, here’s the tricky part which even confused me the first time I setup android tools. UNZIP ANDROID ZIPAt the time this article was written this was the latest zip avaialable (for mac). You can change the file name according to yours. ~/android $ unzip commandlinetools-mac-6858069_latest.zip ~/android $ rm commandlinetools-mac-6858069_latest.zip Then we need to move and unzip the tools in android directory we just created: ~/android $ mv ~/commandlinetools-mac-6858069_latest.zip. Now that you’ve dowloaded the tools zip and moved it to home folder of your system, we can go on ahead on setting them up, so that the CLI is available to you.įirst we need to create a directory to store the android sdk and other stuff, so open a terminal window and follow the steps: ~ $ mkdir android ~ $ cd android Now there’s another way to do this in one step, you can just copy the link to the zip file, then open a terminal window and: ~ $ wget Step 2 - Setting up the Android Tools (CLI) Now after you’ve downloaded the zip file, move it to your home location i.e. ![]() Here is the section you need to visit and click on the tools next to your operating system You may download and install OpenJDK from AdoptOpenJDK or your system packager. UNZIP ANDROID FOR ANDROIDI’d suggest installing openjdk8, as it is prime choice for Android development, You can install it via commands below.įor Mac - brew install -cask adoptopenjdk/openjdk/adoptopenjdk8 Prerequisitesįor this guide I assume you’ve already installed the Java JDK of your choice. So in this article I would like to show you how you can set it up. Fortunately, Google has provided us with Android Command-Line Tools. So I looked for a way to install Android SDK and other stuff, without installing the “Android Studio”, and I found it. Also I’ll be honest, it’s a big IDE, till last month I was using a early 2015 macbook air with 128G of storage, so you can guess yourself how precious the space was to me.Īlso, I like using command line as much as I can, because for me, it’s easier than the GUI (debatable, I know, but we all have our preferences). Now I’ve been building apps using React Native for about 4 years now, and didn’t have any need for a full-fledged Android Studio IDE other than to install SDK(s) and emulator(s). Android SDK is the prerequisite for building android apps, be it via native Kotlin, or other popular libraries like React Native and Flutter. The foundation of android mobile development using any library is the “Android SDK”. Photo by Glenn Carstens-Peters on Unsplash ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |