"Reprint" in Ubuntu Environment configuration Android Studio

Source: Internet
Author: User

Before learning the development of Android, has been with a variety of tutorials, the use of Eclipse+adt, mainly is more convenient, easy to use, especially for the habit of developing Java with Eclipse friends, to get started is better stress-free. But after all, Eclipse+adt can only count Google's son, especially after having a pro-son Android studio, the trend will be to use Android Studio for Android development.

Because of too much trouble, so has not tried, yesterday idle to nothing, tinker a bit, the Android studio configuration, the most intuitive feeling is: beautiful! For me who always envy friends who play other languages around me, Android Studio is just poking my heart in the face of a tall editor. Not much else, light a black theme and a variety of code highlighting can make me drool. "Yes, the blogger is a little white program ape who loves to pack 13." As for the specific advantages of Android studio, please refer to the New Android development tool in this article.

(for Eclipse, for Android Studio, which style you prefer, look at yourself, but if you don't like the following, it won't come in →_→)

OK, bloggers also said nonsense, below cut into the topic, how to configure Android Studio in Ubuntu environment. "Bloggers still have to say a word ... This article is small Bai Bo main to other small white program ape, the Great God Bypass, do not like to spray--"

First, the JDK configuration (already configured friends can skip directly 0.0)

1. Download JDK

Click here to enter the download page, and note the option to select the. tar.gz suffix of the JDK compression pack

2. Enter your download directory at the command line and execute the following command:

sudo tar zxvf./jdk-8u20-linux-x64.tar.gz -C. /.. /.. /usr/lib/jvm

(Note that the Italic section is the name of the JDK Zip package you downloaded)

3. Enter the directory

CD USR/LIB/JVM

4. Use the command:

sudo mv Jdk1.8.0_20/java-8u20-sun

5. Configure Environment variables

sudo gedit ~/.BASHRC

At the end of the open document, add the following:

Export Java_home=/usr/lib/jvm/java-8u20-sun

Export JRE_HOME=${JAVA_HOME}/JRE

Export Classpath=.:${java_home}/lib:${jre_home}/lib

Export Path=${java_home}/bin: $PATH

6. Use the command:

SOURCE ~/.BASHRC

Now that the JDK is configured, download and configure Android Studio below

Second, Android studio download and configuration

1. Download Android Studio

Click here to go to the download page

2. Unpack the installation package

Move the installation package to the directory where you want to install Android Studio, and then do the following:

sudo tar zxvf android-studio-bundle-135.1245622-linux.tgz

(Note the Italic section for the Android Studio ZIP package name you downloaded)

After extracting it, the folder is named Android-studio.

3. Command line into Android-studio/bin, execute Android Studio

./studio.sh

Android Studio has appeared in front of you, start creating projects, step by step, but you will find that entering the main interface will always be stuck in the download gradle steps ... For Android developers, it should be quick to understand ... The Wall again ...

You can choose to hang the agent, which I will not say, or choose to download the offline package.

3. Download Gradle

Find and click on Android Studio Settings option setting, select Gradle on the left, you can see the default Gradle directory on the right, Ubuntu is generally/home/username/.gradle

Enter. gradle/wrapper/dists/, you can see the required version of Gradle, Bo Master this version of Android Studio (Beta) v0.8 need is Gradle-1.12-all

Click here to go to the Gradle download page and select the desired version at previous releases below for download.

4, Configuration Gradle

Place the downloaded gradle-1.12-all.zip under the. gradle/wrapper/dists/2apkk7d25miauqf1pdjp1bm0uo/and delete the Gradle-1.12-all.zip.part file

Many tutorials on the web say here is the configuration is successful, but I will open the Android studio to create the project is still stuck in the download configuration gradle ... It's been a while, and it's done in the following way.

Reopen Android Studio and open the project you created in workspace the first time you entered. At this point, the main interface is successfully entered and appears to start loading. However, after a while, you will notice that the downlad:xxxxxx is still displayed at the bottom of the window. Don't worry, click on the hint, the message will become an active window, and then in that small window, find this string of annoying download Gradle prompt, click on the right stop button ... Then, the system finally began to find and load the local Gradle compression package, wait a moment, waiting for the progress bar to finish, it's done ~

5, to this point, Android Studio can be formally used, a new project to try it ~ but the software default theme is still white, need to enter the setting, select appearance on the left, the right side of the theme to choose Darcula on the line. Again, if you think the font is too small, you need to adjust the font, you need to set the font to save as your own configuration, because the default configuration is unable to modify the font of ~

Finally, thank you for reading!

"Forgive bloggers for finding a solution to the way and forgot O (╯-╰) o plus more lazy ... A friend with a problem can leave a message or contact blogger @ray without forgetting beginner's mind "

"Original address: http://www.ray-world.com/?p=618"

"Reprint" in Ubuntu Environment configuration Android Studio

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.