setup and create android app using android studio in ubuntu 14.04

20

Upload: baabtracom-no-1-supplier-of-quality-freshers

Post on 15-Jul-2015

932 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Setup and create android app using android studio in ubuntu 14.04
Page 3: Setup and create android app using android studio in ubuntu 14.04

❏ Setting up Android Development environment in Ubuntu 14.04

❏ Your first app - For android TV, Android wear and Android Phone

❏ Summary

Contents

Page 4: Setup and create android app using android studio in ubuntu 14.04

❏ Make sure that you have latest JDK (Java Development Kit installed on your computer. In the terminal (Ctrl+Alt+ T) type sudo apt-get install default-jre (This is java run time environment)

❏ You need to install Java Development Kit : sudo apt-get install default-jdk ❏ To confirm that it is installed properly, use the command : javac -version.

❏ Download Android Studio from https://developer.android.com/sdk/installing/index.html?pkg=studio

❏ Unpack the downloaded ZIP file into an appropriate location for your applications. Please note that when you copy, copy to a place where you have full access. It is better to copy to Desktop. Other you will have face the problem of not able to making the file executable in Linux or Ubuntu. The simple fix is to copy the set up to Desktop.

Steps for Android Application development

Page 5: Setup and create android app using android studio in ubuntu 14.04

❏ To launch Android Studio, navigate to the android-studio/bin/ directory in a terminal and execute studio.sh.Press Ctrl + Alt + T to open terminal. cd Desktop/android-studio/bin./studio.h

Page 6: Setup and create android app using android studio in ubuntu 14.04

❏ You may want to add android-studio/bin/ to your PATH environmental variable so that you can start Android Studio from any directory.

Steps: Press Ctrl+Alt+T to open the terminal Type haris@haris:~$ sudo gedit /etc/environment

Add the path as shown in the attachment. Please note that you will have restart your computer for this to take effect. PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/haris/Desktop/android-studio/bin"

Page 7: Setup and create android app using android studio in ubuntu 14.04

❏ Once the path is set you can type studio.sh from the terminal from any where.

❏ Now you are ready to go and the Android Studio initial setup is ready.

Page 8: Setup and create android app using android studio in ubuntu 14.04

❏ Now you can create a new project by Clicking File → New project.

❏ After you provide all the necessary details, you will get the following error. I am not covering here what we should provide in each screen when starting a new project. But I want to walk you through the errors that you can get.

Starting the first project

Page 9: Setup and create android app using android studio in ubuntu 14.04

❏ /home/haris/Android/Sdk/tools/emulator -avd Nexus_5_API_21_x86 -netspeed full -netdelay noneemulator: ERROR: x86 emulation currently requires

hardware acceleration!Please ensure KVM is properly installed and usable.CPU acceleration status: KVM is not installed on this

machine (/dev/kvm is missing).

❏ Type sudo km-ok and type the password. If cpu-checker is not installed, it will prompt you to install cpu-checker. You can install using the following command.

❏ sudo apt-get install cpu-checker

Page 10: Setup and create android app using android studio in ubuntu 14.04

❏ sudo kvm-ok : It can give the following error haris@haris:~$ sudo kvm-ok INFO: /dev/kvm does not existHINT: sudo modprobe kvm_intelINFO: Your CPU supports KVM extensionsINFO: KVM (vmx) is disabled by your BIOSHINT: Enter your BIOS setup and enable Virtualization Technology (VT), and then hard poweroff/poweron your systemKVM acceleration can NOT be used

Page 11: Setup and create android app using android studio in ubuntu 14.04

❏ In order to fix this error Steps:Restart your system While booting press F2 to go the BIOS - Go to Configuration

Page 12: Setup and create android app using android studio in ubuntu 14.04

❏ Type Enter

Page 13: Setup and create android app using android studio in ubuntu 14.04

❏ Make sure that Intel Virtual Technology it is Enabled

Page 14: Setup and create android app using android studio in ubuntu 14.04

❏ Press F10 to save and exit

Page 15: Setup and create android app using android studio in ubuntu 14.04

Now you are good to go

Page 17: Setup and create android app using android studio in ubuntu 14.04

US UK UAE

7002 Hana Road, Edison NJ 08817, United States of America.

90 High Street,

Cherry Hinton,

Cambridge, CB1 9HZ,

United Kingdom.

Suite No: 51, Oasis Center,

Sheikh Zayed Road, Dubai,

UAE

Email to [email protected] or Visit baabtra.com

Looking for learning coding or software engineering?

Page 18: Setup and create android app using android studio in ubuntu 14.04

India Centres

Emarald Mall (Big Bazar Building)Mavoor Road, Kozhikode,Kerala, India.Ph: + 91 – 495 40 25 550

NC Complex, Near Bus StandMukkam, Kozhikode,Kerala, India.Ph: + 91 – 495 40 25 550

Cafit Square IT Park,Hilite Business Park,KozhikodeKerala, India.

Email: [email protected]

TBI - NITCNIT Campus, Kozhikode.Kerala, India.

Start up VillageEranakulam,Kerala, India.

Start up VillageUL CCKozhikode, Kerala

Page 19: Setup and create android app using android studio in ubuntu 14.04

Follow us @ twitter.com/baabtra

Like us @ facebook.com/baabtra

Subscribe to us @ youtube.com/baabtra

Become a follower @ slideshare.net/BaabtraMentoringPartner

Connect to us @ in.linkedin.com/in/baabtra

Give a feedback @ massbaab.com/baabtra

Thanks in advance

www.baabtra.com | www.massbaab.com |www.baabte.com

Page 20: Setup and create android app using android studio in ubuntu 14.04

Want to learn more about programming or Looking to become a good programmer?

Are you wasting time on searching so many contents online?

Do you want to learn things quickly?

Tired of spending huge amount of money to become a Software professional?

Do an online course @ baabtra.com

We put industry standards to practice. Our structured, activity based courses are so designed to make a quick, good software professional out of anybody who holds a passion for coding.