SlideShare uma empresa Scribd logo
1 de 11
Baixar para ler offline
Set up Android
   On Linux
  By Asanka Nissanka
Installing JDK
Download JDK from Oracle site
    http://www.oracle.com/technetwork/java/javase/downloads

The installation file I use is jdk-7u2-linux-i586.tar.gz.

Change directory to install the JDK code in /opt
    cd /opt

extract the JDK files
     sudo tar -xvzf <location of downloaded JDK>/jdk-7u2-linux-i586.tar.gz
           This will put the JDK into the newly created directory named jdk1.7.0_02

Update environment variables to point to the newly installed JDK by editing the /etc/environment file.
    sudo nano /etc/environment
         Add the JAVA_HOME variable, and add JDK bin to the PATH variable.
         JAVA_HOME="/opt/jdk1.7.0_01"
         PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/jdk1.7.0_01/bin"

Refresh the environment variable.
     source /etc/environment

Verify that the updated environment variables are in place and the path to the JDK is valid
      $ echo $JAVA_HOME
      /opt/jdk1.7.0_01
      $ echo $PATH
      /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/jdk1.7.0_01/bin
      $ javac -version
      javac 1.7.0_01
Update Java alternative list. You want to set a higher priority for the new JDK.(If you have already
installed open-jdk)
     $ update-alternatives --verbose --query java
     Link: java
     Status: auto
     Best: /usr/lib/jvm/java-6-openjdk/jre/bin/java
     Value: /usr/lib/jvm/java-6-openjdk/jre/bin/java
     Alternative: /usr/lib/jvm/java-6-openjdk/jre/bin/java
     Priority: 1061
     Slaves:
     java.1.gz /usr/lib/jvm/java-6-openjdk/jre/man/man1/java.1.gz

So, let’s make the new JDK our default…

     sudo update-alternatives --install /usr/bin/java java /opt/jdk1.7.0_02/bin/java
     update-alternatives: using /opt/jdk1.7.0_01/bin/java to provide /usr/bin/java (java) in auto mode.

Now type
     java -version
    java version "1.7.0_02"
    Java(TM) SE Runtime Environment (build 1.7.0_01-b08)
    Java HotSpot(TM) 64-Bit Server VM (build 21.1-b02, mixed mode)
Installing eclipse

1. Download Eclipse Indigo from homepage (eclipse-jee-indigo-SR1-linux-gtk.tar.gz for 32 bit OS)

2. Extract to a folder (can use Archive Manager or tar command)
     cd /opt
     sudo tar -xvzf <eclipse tar ball directory>/eclipse-jee-indigo-SR1-linux-gtk.tar.gz
     sudo chown -R root:root eclipse
     sudo chmod -R +r eclipse

3. Run Eclipse from command line:

     cd <eclipse foler>./eclipse

4. If we get the warning about the GTK same as below:

     Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",

     just install the missing module using below command:

     sudo apt-get install gtk2-engines-pixbuf
OPTIONAL STEP TO CREATE A LAUNCHER ON DESKTOP

   Creating an eclipse executable in path
       sudo touch /usr/bin/eclipse
       sudo chmod 755 /usr/bin/eclipse
       sudo nano /usr/bin/eclipse
       Copy this to nano, then save & exit
            #!/bin/sh
            #export MOZILLA_FIVE_HOME="/usr/lib/mozilla/"
            export ECLIPSE_HOME="/opt/eclipse"

             $ECLIPSE_HOME/eclipse $*
   Create a gnome menu item
       sudo nano /usr/share/applications/eclipse.desktop
       Copy this to nano, then save and exit
             [Desktop Entry]
             Encoding=UTF-8
             Name=Eclipse
             Comment=Eclipse IDE
             Exec=eclipse
             Icon=/opt/eclipse/icon.xpm
             Terminal=false
             Type=Application
             Categories=GNOME;Application;Development;
             StartupNotify=true
   Launch eclipse for the first time
       /opt/eclipse/eclipse -clean &
Prepare Android SDK

1. Download the file “android-sdk-linux.tar.gz” from the babbage

2. Extract it to /opt directory
     cd /opt
     sudo tar -xvzf <path to the sdk file>/android-sdk-linux.tar.gz



Add ADT plugin to eclipse

     Help → Install New Software → Add
Finally goto Windows -> Preferences & there you will see a selection “Android”. Select it and set the SDK location
Lets START developing....
Thank you
asankanissanka@gmail.com

Mais conteúdo relacionado

Último

The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
heathfieldcps1
 

Último (20)

Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
Towards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptxTowards a code of practice for AI in AT.pptx
Towards a code of practice for AI in AT.pptx
 
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
80 ĐỀ THI THỬ TUYỂN SINH TIẾNG ANH VÀO 10 SỞ GD – ĐT THÀNH PHỐ HỒ CHÍ MINH NĂ...
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 

Destaque

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 

Destaque (20)

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 

Getting start android

  • 1. Set up Android On Linux By Asanka Nissanka
  • 2. Installing JDK Download JDK from Oracle site http://www.oracle.com/technetwork/java/javase/downloads The installation file I use is jdk-7u2-linux-i586.tar.gz. Change directory to install the JDK code in /opt cd /opt extract the JDK files sudo tar -xvzf <location of downloaded JDK>/jdk-7u2-linux-i586.tar.gz This will put the JDK into the newly created directory named jdk1.7.0_02 Update environment variables to point to the newly installed JDK by editing the /etc/environment file. sudo nano /etc/environment Add the JAVA_HOME variable, and add JDK bin to the PATH variable. JAVA_HOME="/opt/jdk1.7.0_01" PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/jdk1.7.0_01/bin" Refresh the environment variable. source /etc/environment Verify that the updated environment variables are in place and the path to the JDK is valid $ echo $JAVA_HOME /opt/jdk1.7.0_01 $ echo $PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/jdk1.7.0_01/bin $ javac -version javac 1.7.0_01
  • 3. Update Java alternative list. You want to set a higher priority for the new JDK.(If you have already installed open-jdk) $ update-alternatives --verbose --query java Link: java Status: auto Best: /usr/lib/jvm/java-6-openjdk/jre/bin/java Value: /usr/lib/jvm/java-6-openjdk/jre/bin/java Alternative: /usr/lib/jvm/java-6-openjdk/jre/bin/java Priority: 1061 Slaves: java.1.gz /usr/lib/jvm/java-6-openjdk/jre/man/man1/java.1.gz So, let’s make the new JDK our default… sudo update-alternatives --install /usr/bin/java java /opt/jdk1.7.0_02/bin/java update-alternatives: using /opt/jdk1.7.0_01/bin/java to provide /usr/bin/java (java) in auto mode. Now type java -version java version "1.7.0_02" Java(TM) SE Runtime Environment (build 1.7.0_01-b08) Java HotSpot(TM) 64-Bit Server VM (build 21.1-b02, mixed mode)
  • 4. Installing eclipse 1. Download Eclipse Indigo from homepage (eclipse-jee-indigo-SR1-linux-gtk.tar.gz for 32 bit OS) 2. Extract to a folder (can use Archive Manager or tar command) cd /opt sudo tar -xvzf <eclipse tar ball directory>/eclipse-jee-indigo-SR1-linux-gtk.tar.gz sudo chown -R root:root eclipse sudo chmod -R +r eclipse 3. Run Eclipse from command line: cd <eclipse foler>./eclipse 4. If we get the warning about the GTK same as below: Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap", just install the missing module using below command: sudo apt-get install gtk2-engines-pixbuf
  • 5. OPTIONAL STEP TO CREATE A LAUNCHER ON DESKTOP Creating an eclipse executable in path sudo touch /usr/bin/eclipse sudo chmod 755 /usr/bin/eclipse sudo nano /usr/bin/eclipse Copy this to nano, then save & exit #!/bin/sh #export MOZILLA_FIVE_HOME="/usr/lib/mozilla/" export ECLIPSE_HOME="/opt/eclipse" $ECLIPSE_HOME/eclipse $* Create a gnome menu item sudo nano /usr/share/applications/eclipse.desktop Copy this to nano, then save and exit [Desktop Entry] Encoding=UTF-8 Name=Eclipse Comment=Eclipse IDE Exec=eclipse Icon=/opt/eclipse/icon.xpm Terminal=false Type=Application Categories=GNOME;Application;Development; StartupNotify=true Launch eclipse for the first time /opt/eclipse/eclipse -clean &
  • 6. Prepare Android SDK 1. Download the file “android-sdk-linux.tar.gz” from the babbage 2. Extract it to /opt directory cd /opt sudo tar -xvzf <path to the sdk file>/android-sdk-linux.tar.gz Add ADT plugin to eclipse Help → Install New Software → Add
  • 7.
  • 8.
  • 9. Finally goto Windows -> Preferences & there you will see a selection “Android”. Select it and set the SDK location