Difference between revisions of "OS: Android - Android Studio"

From OnnoWiki
Jump to navigation Jump to search
 
(23 intermediate revisions by the same user not shown)
Line 45: Line 45:
  
  
 +
==Instalasi Android Studio==
  
 +
Siapkan aplikasi pendukung
  
Installing Android Studio
+
sudo apt-get update
  
    Download the Android Studio package from above.
 
    Install Android Studio and the SDK tools:
 
  
    Windows:
+
===Untuk 32bit===
        Launch the downloaded EXE file, android-studio-bundle-<version>.exe.
 
        Follow the setup wizard to install Android Studio.
 
  
        Known issue: On some Windows systems, the launcher script does not find where Java is installed. If you encounter this problem, you need to set an environment variable indicating the correct location.
+
sudo apt-get install libc6 libncurses5 libstdc++6 libz1 libncurses5 libbz2-1.0 \
 +
android-tools-adb android-tools-fastboot python-lunch
  
        Select Start menu > Computer > System Properties > Advanced System Properties. Then open Advanced tab > Environment Variables and add a new system variable JAVA_HOME that points to your JDK folder, for example C:\Program Files\Java\jdk1.7.0_21.
+
===Untuk 64bit===
  
    Mac OS X:
+
sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386 lib32z1 lib32ncurses5 lib32bz2-1.0 \
        Open the downloaded DMG file, android-studio-bundle-<version>.dmg.
+
android-tools-adb android-tools-fastboot python-lunch
        Drag and drop Android Studio into the Applications folder.
 
  
        Known issue: Depending on your security settings, when you attempt to open Android Studio, you might see a warning that says the package is damaged and should be moved to the trash. If this happens, go to System Preferences > Security & Privacy and under Allow applications downloaded from, select Anywhere. Then open Android Studio again.
 
  
    Linux:
+
Siapkan Java Development Kit
        Unpack the downloaded Tar file, android-studio-bundle-<version>.tgz, into an appropriate location for your applications.
 
        To launch Android Studio, navigate to the android-studio/bin/ directory in a terminal and execute studio.sh.
 
  
        You may want to add android-studio/bin/ to your PATH environmental variable so that you can start Android Studio from any directory.
+
* Account di oracle.com, kita perlu membuat account di oracle.com untuk bisa men-download JDK Java yang dibutuhkan.
  
That's it! You're ready to start developing apps with Android Studio.
+
https://login.oracle.com/mysso/signon.jsp
  
Note: On Windows and Mac, the individual tools and other SDK packages are saved within the Android Studio application directory. To access the tools directly, use a terminal to navigate into the application and locate the sdk/ directory. For example:
+
* Download JDK 7 dari
  
Windows: \Users\<user>\AppData\Local\Android\android-studio\sdk\
+
http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html
 +
http://www.oracle.com/technetwork/java/javase/downloads/java-archive-downloads-javase7-521261.html
  
Mac: /Applications/Android\ Studio.app/sdk/
+
* Lakukan
  
For a list of some known issues, see tools.android.com/knownissues.
+
cp jdk-7u80-linux-i586.tar.gz /usr/local/src/
Starting a Project
+
cd /usr/local/src/
 +
tar zxvf jdk-7u80-linux-i586.tar.gz
  
When you launch Android Studio for the first time, you'll see a Welcome screen that offers several ways to get started:
+
* Export path JDK di /usr/local/src/jdk1.7.0_80
  
    To start building a new app, click New Project.
+
JAVA_HOME=/usr/local/src/jdk1.7.0_80
 +
export JAVA_HOME
 +
PATH=$JAVA_HOME/bin:$PATH
 +
export PATH
  
    This starts the New Project wizard, which helps you set up a project using an app template.
+
==Download==
    To import an existing Android app project, click Import Project.
 
  
    Note: If you previously developed your Android project with Eclipse, you should first use the new export feature in the ADT plugin to prepare your project with the new Gradle build system. For more information, read Migrating from Eclipse.
+
Siapkan Android Studio untuk di Instalasi
  
For additional help using Android Studio, read Tips and Tricks.
+
* Download Android Studio dari
  
As you continue developing apps, you may need to install additional versions of Android for the emulator and other packages such as the Android Support Library. To install more packages, use the SDK Manager, which you can open from Android Studio by clicking SDK Manager in the toolbar.
+
http://tools.android.com/download/studio/stable
 +
http://tools.android.com/download/studio/builds/android-studio-2-1-2
 +
https://dl.google.com/dl/android/studio/ide-zips/2.1.2.0/android-studio-ide-143.2915827-linux.zip
  
 +
 +
* Copy & Extrak
 +
 +
sudo su
 +
rm -Rf /usr/local/src/android-studio
 +
cp android-studio-ide-143.2915827-linux.zip /usr/local/src/
 +
cd /usr/local/src/
 +
unzip android-studio-ide-143.2915827-linux.zip
 +
 +
==Menjalankan Android Studio==
 +
 +
* Menjalankan android studio sebagai super user
 +
 +
sudo su
 +
cd /usr/local/src/android-studio/bin/
 +
./studio.sh
 +
 +
 +
Jika kita ingin menjalankan android-studio dari path lainnya, kita dapat menambahkan android-studio/bin ke PATH
 +
 +
PATH=/usr/local/src/android-studio/bin:$PATH
 +
export PATH
 +
 +
Selesai sudah, kita siap menggunakan android-studio.
 +
 +
Jika kita pertama kali menjalankan Android Studio, kita akan melihat Welcome Screen yang memberikan beberapa cara untuk memulai:
 +
 +
* Untuk membuat apps baru, klik New Project.
 +
* Ini akan menjalankan New Project wizard yang akan membantu kita untuk mensetup sebuah project menggunakan app template yang ada.
  
 
==Referensi==
 
==Referensi==

Latest revision as of 12:35, 14 July 2016

Android Studio

  • Android Studio IDE
  • Android SDK tools
  • Android 5.0 (Lollipop) Platform
  • Android 5.0 emulator system image dengan Google API

Kebutuhan System

Windows

  • Microsoft® Windows® 8/7/Vista/2003 (32 or 64-bit)
  • 2 GB RAM minimum, 4 GB RAM recommended
  • 400 MB hard disk space
  • At least 1 GB for Android SDK, emulator system images, and caches
  • 1280 x 800 minimum screen resolution
  • Java Development Kit (JDK) 7
  • Optional for accelerated emulator: Intel® processor with support for Intel® VT-x, Intel® EM64T (Intel® 64), and Execute Disable (XD) Bit functionality

Mac OS X

  • Mac® OS X® 10.8.5 or higher, up to 10.9 (Mavericks)
  • 2 GB RAM minimum, 4 GB RAM recommended
  • 400 MB hard disk space
  • At least 1 GB for Android SDK, emulator system images, and caches
  • 1280 x 800 minimum screen resolution
  • Java Runtime Environment (JRE) 6
  • Java Development Kit (JDK) 7
  • Optional for accelerated emulator: Intel® processor with support for Intel® VT-x, Intel® EM64T (Intel® 64), and Execute Disable (XD) Bit functionality

Di Mac OS, menjalankan Android Studio dengan Java Runtime Environment (JRE) 6 untuk mengoptimasi font rendering. Kita dapat mengkonfigurasi project kita untuk menggunakan Java Development Kit (JDK) 6 or JDK 7.

Linux

  • GNOME or KDE desktop
  • GNU C Library (glibc) 2.15 or later
  • 2 GB RAM minimum, 4 GB RAM recommended
  • 400 MB hard disk space
  • At least 1 GB for Android SDK, emulator system images, and caches
  • 1280 x 800 minimum screen resolution
  • Oracle® Java Development Kit (JDK) 7

Di test di Ubuntu 14.04, Trusty Tahr (distribusi 64-bit yang mampu menjalankan aplikasi 32-bit).


Instalasi Android Studio

Siapkan aplikasi pendukung

sudo apt-get update


Untuk 32bit

sudo apt-get install libc6 libncurses5 libstdc++6 libz1 libncurses5 libbz2-1.0 \
android-tools-adb android-tools-fastboot python-lunch

Untuk 64bit

sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386 lib32z1 lib32ncurses5 lib32bz2-1.0 \
android-tools-adb android-tools-fastboot python-lunch


Siapkan Java Development Kit

  • Account di oracle.com, kita perlu membuat account di oracle.com untuk bisa men-download JDK Java yang dibutuhkan.
https://login.oracle.com/mysso/signon.jsp
  • Download JDK 7 dari
http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html
http://www.oracle.com/technetwork/java/javase/downloads/java-archive-downloads-javase7-521261.html
  • Lakukan
cp jdk-7u80-linux-i586.tar.gz /usr/local/src/
cd /usr/local/src/
tar zxvf jdk-7u80-linux-i586.tar.gz
  • Export path JDK di /usr/local/src/jdk1.7.0_80
JAVA_HOME=/usr/local/src/jdk1.7.0_80
export JAVA_HOME
PATH=$JAVA_HOME/bin:$PATH 
export PATH

Download

Siapkan Android Studio untuk di Instalasi

  • Download Android Studio dari
http://tools.android.com/download/studio/stable
http://tools.android.com/download/studio/builds/android-studio-2-1-2
https://dl.google.com/dl/android/studio/ide-zips/2.1.2.0/android-studio-ide-143.2915827-linux.zip


  • Copy & Extrak
sudo su
rm -Rf /usr/local/src/android-studio
cp android-studio-ide-143.2915827-linux.zip /usr/local/src/
cd /usr/local/src/
unzip android-studio-ide-143.2915827-linux.zip

Menjalankan Android Studio

  • Menjalankan android studio sebagai super user
sudo su
cd /usr/local/src/android-studio/bin/
./studio.sh


Jika kita ingin menjalankan android-studio dari path lainnya, kita dapat menambahkan android-studio/bin ke PATH

PATH=/usr/local/src/android-studio/bin:$PATH 
export PATH

Selesai sudah, kita siap menggunakan android-studio.

Jika kita pertama kali menjalankan Android Studio, kita akan melihat Welcome Screen yang memberikan beberapa cara untuk memulai:

  • Untuk membuat apps baru, klik New Project.
  • Ini akan menjalankan New Project wizard yang akan membantu kita untuk mensetup sebuah project menggunakan app template yang ada.

Referensi

Pranala Menarik