Thu. Dec 2nd, 2021
icon

In order to develop Android apps, you’ll need to put in two issues:
Oracle Java Development Kit (“JDK”) and the Android Studio editor.
Here are the TL;DR actually brief directions:

1. Install JDK 2. Install Android Studio 3. Create a Virtual Device
screenshot
Click Here

Detailed directions:

Step 1. Install Oracle Java Development Kit (“JDK”)

Since Android apps are written in Java, you’ll need the Oracle Java compiler and libraries in your system.
These are collectively referred to as the Java Development Kit or “JDK” for brief.
(If you might be sure that you have already got JDK 1.8 or greater in your pc, equivalent to from taking CS 106A, you’ll be able to skip to Step 2.)
Download the JDK from the next tackle:

Go to the web page and click on the DOWNLOAD hyperlink for the JDK.
(Be cautious to decide on “JDK” and not “JRE”.)
Click the radio button to just accept the License Agreement, then obtain the suitable JDK to your working system.
For instance, on Windows, click on to obtain the “Windows x86” installer.

screenshot
screenshot

(A standard mistake right here is to by chance obtain the Java Runtime Environment, or “JRE”, as a substitute of JDK.
The JRE isn’t the correct obtain; JRE allows you to run Java applications however not compile or develop your personal.
Be cautious to obtain JDK and not JRE.)

Once the JDK installer is finished downloading, run it to put in JDK in your system.
You can use the entire default settings.

Step 2. Download and Install Android Studio IDE

The subsequent piece of software program so that you can set up is known as Android Studio.
This is an official textual content editor and built-in improvement setting (IDE) for growing Android apps.
You should set up Oracle JDK earlier than putting in Android Studio, so please do not begin this step till you may have accomplished Step 1 above.

Download Android Studio from the next tackle:

screenshot

Once you click on the Download hyperlink, you can be requested to just accept a license settlement.
Then it is possible for you to to obtain the software program.
The obtain might take some time as a result of the file might be round 1gb or extra in dimension.

Once you may have downloaded the installer, run it to set up Android Studio in your pc.
The set up make take some time due to all of the elements and libraries included.
You can select the entire default settings throughout the set up.
When you first run Android Studio, there are additional questions and downloads of assorted elements; you could once more use the entire defaults for this a part of the method.
Make sure that the “Virtual Device” checkbox is checked throughout your set up, if obtainable.

(Mac OS X solely)
If you might be utilizing a Mac, your pc may attempt to block the Android Studio set up.
You may see a warning that claims, “The package is damaged and should be moved to the trash.”
If your OS is obstructing the set up, go to System Preferences > Security & Privacy and beneath “Allow applications downloaded from”, choose Anywhere.
Then attempt to open Android Studio once more.

(Windows solely)
If you might be utilizing the Windows working system, you also needs to obtain and set up the next USB driver pack.
These USB drivers will aid you to deploy apps to your telephone or pill out of your pc.

If you want extra data, see Google’s Android web page on putting in Android Studio:

Step 3. Create Virtual Device

To run your Android apps in your pc, you should utilize a “virtual device” which is a software program emulation of an Android telephone or pill.
In previous variations, you wanted to arrange this digital machine your self.
But if you happen to set up the present model of Android Studio with the default settings, it mechanically creates a “Nexus X” machine for you, so that you needn’t do something right here.
Hooray!

If you want extra data on this step, see Google’s Android web page on digital gadgets:

Step 5. Make and Run a “Hello World” Project

You’re mainly accomplished now, however let’s be sure that every thing is working correctly by creating and working an empty “Hello World” undertaking.
Load up Android Studio and click on “Start a new Android Studio project”.
(If that is your first time ever working Android Studio and making a undertaking, you could have to Accept the license settlement or Install some elements.)

In normal, you should utilize the entire default settings and names to your undertaking.
But if there’s a checkbox for “Kotlin support” throughout the undertaking creation, be sure that to test it.
When you get to the “Add an activity” display screen, simply select the default “Blank Activity” possibility.
Click Next and Finish on every display screen till the undertaking is created.

Once the undertaking is created, you need to see a Design view with a palette of widgets and a preview picture that appears like an Android machine.
You needn’t edit any code or something but.

screenshot

Click the “Play” button icon within the prime toolbar to run the app:
icon
Once you do that, it is going to ask you what digital machine you wish to use.

On most machines, you’ll be able to select the default digital machine that was created throughout set up.
(Ours was referred to as “Nexus X API 28” when this information was final up to date.)

If you do not see any digital gadgets obtainable, you could have to create one.
Click “+ Create Virtual Device…”, then largely select the defaults.
Set Category to “Phone”, Device identify to “Nexus 5X”.
On the subsequent display screen about System Image, Choose Pie.
If essential, click on “Download” subsequent to “Pie” to put in the mandatory software program.

If you get the next error at this level:

emulator: ERROR: x86 emulation presently requires {hardware} acceleration!
Please guarantee Intel HAXM is correctly put in and usable.
CPU acceleration standing: HAX kernel module isn't put in!

There are two methods to repair this error.
The first repair is to allow {hardware} acceleration by following .
This is the popular repair if doable.

If that repair doesn’t work, you’ll be able to as a substitute change your VM to make use of the ARM CPU mode relatively than x86.
Unfortunately, altering your VM to ARM mode will make the VM run very slowly as a result of it isn’t {hardware} accelerated.

To change your VM to ARM mode, click on the AVD Manager icon on the prime of Android Studio: icon
Then you need to see your default Nexus machine.
Press the “pencil” icon on the correct facet to edit the machine’s configuration.
In the configuration display screen, within the space for the android model Lollipop, at proper click on Change.
In the window that seems, choose a row the place the “ABI” begins with “arm”, equivalent to “armeabi-v7a”.
Then click on Next/Finish to get again to Android Studio.

screenshot

class=”figure”>

screenshot
screenshot

When you attempt to run the app in your digital machine, typically the machine simply sits on the machine’s house display screen relatively than mechanically working your app.
If this occurs, click on the bottom-right button within the digital machine, the one that appears like a 3×3 telephone keypad.
This ought to pop up a listing of all apps obtainable.
Find your app within the record and click on it to run it.

If you want extra data on this step, see Google’s Android web page on creating a primary undertaking:

By admin