首页 > 代码库 > linux 下 Android Studio 1.0 的候选版本安装

linux 下 Android Studio 1.0 的候选版本安装

Latest Android Studio Canary Build: 1.0 Release Candidate 1
http://tools.android.com/download/studio/canary/latest


https://dl.google.com/dl/android/studio/ide-zips/1.0.0-rc1/android-studio-ide-135.1598475-linux.zip


也可以在这儿找到百度网盘的下载地址
https://github.com/inferjay/AndroidDevTools
http://www.androiddevtools.cn/






unzip -x android-studio-ide-135.1598475-linux.zip (本身就是64位的,不像adt 那样分32和64版本)32位系统好像需要改参数


cd android-studio/


配置环境变量:
启动android studio,查找java的顺序是:
STUDIO_JDK, JDK_HOME, JAVA_HOME, 你可以配置其中的任意一个就可以。


即下面三种方式都可以

export STUDIO_JDK=/opt/jdk1.7.0_71

export JDK_HOME=/opt/jdk1.7.0_71

export JAVA_HOME=/opt/jdk1.7.0_71


如果都没有配置, 那么启动脚本会自动判断java的安装路径,(采用which java的方式)


我的设置是:
export JAVA_HOME=/opt/jdk1.7.0_71 只需要设置这个就可以了,下面两行选配
export PATH=$JAVA_HOME/bin:$PATH
export CLASSPATH=.:$JAVA_HOME/jre/lib/rt.jar:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar


java下载页面的入口:
http://www.oracle.com/technetwork/java/javase/downloads/index.html


java 7 下载页面, u71/u72
http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html


java 8 下载页面, u25
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html


旧版本java 8下载页面, 到8u20
http://www.oracle.com/technetwork/java/javase/downloads/java-archive-javase8-2177648.html
旧版本java 7下载页面, 到7u67
http://www.oracle.com/technetwork/java/javase/downloads/java-archive-downloads-javase7-521261.html
旧版本java 6下载页面, 到6u45
http://www.oracle.com/technetwork/java/javase/downloads/java-archive-downloads-javase6-419409.html
旧版本java 5下载页面, 到5.0u22
http://www.oracle.com/technetwork/java/javasebusiness/downloads/java-archive-downloads-javase5-419410.html
http://www.oracle.com/technetwork/java/javasebusiness/downloads/java-archive-downloads-javase14-419411.html
http://www.oracle.com/technetwork/java/javasebusiness/downloads/java-archive-downloads-javase13-419413.html
http://www.oracle.com/technetwork/java/javasebusiness/downloads/java-archive-downloads-javase12-419414.html
http://www.oracle.com/technetwork/java/javasebusiness/downloads/java-archive-downloads-javase11-419415.html



启动:
bin/studio.sh


第一次启动会先安装,
安装的配置文件在:~/.AndroidStudio/
安装过程中,下载的sdk在: ~/Android/Sdk/


java 版本的要求:


从最新的android 5.0开始,需要安装jdk 1.7才能正常编译
从Android 2.3.1 到 Android 4.4W 需要使用jdk 1.6
2.3和更低的版本需要使用jdk 1.5




https://developer.android.com/guide/topics/manifest/uses-sdk-element.html#ApiLevels
Platform Version            API Level                   VERSION_CODE            Notes


### 使用jdk 1.7 ###
Android 5.0                 21                          LOLLIPOP                Platform Highlights


### 使用jdk 1.6 ###
Android 4.4W                20                          KITKAT_WATCH            KitKat for Wearables Only
Android 4.4                 19                          KITKAT                  Platform Highlights
Android 4.3                 18                          JELLY_BEAN_MR2          Platform Highlights
Android 4.2, 4.2.2          17                          JELLY_BEAN_MR1          Platform Highlights
Android 4.1, 4.1.1          16                          JELLY_BEAN              Platform Highlights
Android 4.0.3, 4.0.4        15                          ICE_CREAM_SANDWICH_MR1  Platform Highlights
Android 4.0, 4.0.1, 4.0.2   14                          ICE_CREAM_SANDWICH
Android 3.2                 13                          HONEYCOMB_MR2   
Android 3.1.x               12                          HONEYCOMB_MR1           Platform Highlights
Android 3.0.x               11                          HONEYCOMB               Platform Highlights
Android 2.3.4
Android 2.3.3               10                          GINGERBREAD_MR1         Platform Highlights
Android 2.3.2
Android 2.3.1


### 使用 jdk1.5 ###
Android 2.3                 9                           GINGERBREAD
Android 2.2.x               8                           FROYO                   Platform Highlights
Android 2.1.x               7                           ECLAIR_MR1              Platform Highlights
Android 2.0.1               6                           ECLAIR_0_1
Android 2.0                 5                           ECLAIR
Android 1.6                 4                           DONUT                   Platform Highlights
Android 1.5                 3                           CUPCAKE                 Platform Highlights


Android 1.1                 2                           BASE_1_1    
Android 1.0                 1                           BASE




https://source.android.com/source/initializing.html


Installing the JDK


The master branch of Android in the Android Open Source Project (AOSP) requires Java 7. On Ubuntu, use OpenJDK.


Java 7: For the latest version of Android


$ sudo apt-get update
$ sudo apt-get install openjdk-7-jdk


Optionally, update the default Java version by running:


$ sudo update-alternatives --config java
$ sudo update-alternatives --config javac


If you encounter version errors for Java, set its path as described in the Wrong Java Version section.


To develop older versions of Android, download and install the corresponding version of the Java JDK:
Java 6: for Gingerbread through KitKat
Java 5: for Cupcake through Froyo


Note: The lunch command in the build step will ensure that the Sun JDK is used instead of any previously installed JDK.

linux 下 Android Studio 1.0 的候选版本安装