Background
I believe you are no stranger to Android studio, Android Studio is Google in the 2013 I/O Assembly for the development of the new development tool for Android, now many open source projects are already in use, Google Update is also very fast, It's obvious that this is the future of Android development, so why don't we embrace the future?
Although the introduction of a long time, but the extent of the popularity of the country is not high, in view of a lot of friends to ask for a detailed tutorial studio, then today I will teach you to download, install, use, Studio road from here onwards.
Android Studio VS Eclipse
Believe that the current domestic use of eclipse or most, then first of all, some of the advantages of studio, the comparison can be more convincing, to explain why we want to migrate from Eclipse to studio.
1, Google launched the
There is no doubt that this is its biggest advantage, Android Stuido is Google launched, specifically for Android "tailor-made" is Google's strong support for the IntelliJ idea of the transformation of the IDE, This should explain why it's the future of Android.
2. Faster speed
Eclipse's startup speed, response speed, memory footprint has been criticized, I believe that we should have a deep understanding, and often encounter card dead state. Studio is a total leader in eclipse in either area
3, the UI is more beautiful
The black theme I'm presenting on I/O is really great, geek fan, Stuido's cool black interface with the Darcula theme is tall, and the black theme of eclipse is too low.
4, more intelligent
Tip complement is significant for development, studio is more intelligent, smart save, and never have to Ctrl + s again. The efficiency will be greatly improved when you are familiar with studio.
5, the integration of Gradle building tools
Gradle is a new build tool that supports gradle at the time of Studio's debut, and it can be said that Gradle brings together the advantages of Ant and Maven, both configuration, compilation, and packaging are great.
6, the powerful UI editor
Android Studio's editor is very smart, in addition to absorbing the advantages of Eclipse+adt, but also with real-time preview of multiple devices, compared to Android developers is a real artifact ah.
7, built-in terminal
Studio built-in terminals, this is the gospel for those who are accustomed to command-line operations, and no longer have to switch back and forth, a studio is all done.
8, More perfect plug-in system
Studio support for a variety of plug-ins, such as Git, Markdown, Gradle, and so on, what do you want plug-ins, direct search downloads.
9, the perfect integration of version control system
The installation comes with a popular version control system such as GitHub, Git, and SVN, which can be directly check out your project.
We have seen the above is not very tempted, the advantages are many, but you will encounter many problems when learning, such as studio and Eclipse directory structure, shortcuts and so on completely different, need to adapt to a period of time, Gradle also increased the learning costs, Although the update speed of Google has been quite fast, but the latest is the 1.0RC version, there is still no official version, indicating that there may be some minor problems, studio official explanation has not supported NDK, so if your project used NDK best not to use studio.
But believe that Google will be more and more perfect, learning cost and adaptation stage is our technology has to maintain the mentality, once the start to believe you have to leave it.
Finally, here's a screenshot of my local studio:
Get ready
Because some of Google's official websites in Android have limited access at home, you know why. So before you start downloading and installing studio, you need to own a ladder, there are many ways about how to turn over the wall, here is not too much to introduce, private thought as an Android developer, do not know how to go over the wall basically can not do. So this investment is worthwhile, we recommend that you buy VPN directly, because I have been tossing a lot of things over the wall, or unstable, or slow, and then figured out, all the money can solve the problem is not a problem, this recommendation ladder VPN, the price is very cheap, do not ask me how fast, stability, I've been using and renewing it for almost two years. (through this link to purchase, your account can be a discount of 10 yuan)
Download
The official download has two places, all need to turn over the wall.
Android Developer website
The website of the Android Developer website can be downloaded directly, but the site appears to have only updated beta and official editions and is currently only updated to Beta 0.8.14.
Android Tools Project Site
The web site of the Android development tool, which links to Studio's Canary channel, lists all of the studio's live previews, and is currently the latest in the 1.0RC edition.
Create a HelloWorld Project
As for the installation there is nothing to say, click directly to run. Here I take the 1.0RC version of the Mac system as an example to create the first HelloWorld project. The other platforms are basically the same, assuming you've configured the JDK and Android SDK environment, and you're installing studio for the first time.
1, first run when the Welcome screen
2, the first time after that will go to the Setup Wizard page
Click Next to enter the Select Settings Type Wizard page
There are two options "Standard" and "custom", i.e. standard and customization, if you do not configure your native Android SDK, select "Standard" Directly and click "Finish" button
Because I have downloaded the SDK locally and configured the environment variables, I choose Custom, and then to the next step:
This step selects the location of your local SDK, you can see a 2.25GB SDK to download, because Studio 1.0 by default to download 5.0 SDK and some tools and so on, and then click the "Finish" button
PS: This selection and download of 2.25G components is a bug in studio, and someone in the comments reminds me to thank the classmate. If you want to skip this step, you can add a row to the idea.properties in the bin directory: Disable.android.first.run=true on the line, the Mac platform's right button installation package->show Package Contents I found the bin directory. )
3. Download Dependent components
Then go to the Download Component page, this process needs to turn over the wall, and rely on your speed, time a little long, we wait patiently ...
Click the Finish button when the download is complete
4. New Project
On this page we can create a new project, or we can import items on the local or GitHub project, etc., the left can see the recently opened items, and so on, here I directly create a new project
And then to the following interface
We fill in the project name and registration and the project path, and then "Next"
This page supports you to match TV, Wear, glass, etc., we only select the first item on OK, choose the smallest SDK then "Next"
This page selects an activity template, and Eclipse is like, we just choose a blank activity.
Click "Finish" after a while to come out following a progress bar, a lot of people easily card here, here need to download Gradle, only the first download, a bit slow, need to turn over the wall, we also patiently waiting for
After successful download, see the following complete project interface
So a simple studio project is done, and the picture can also see the default is a white theme, not cool? Studio default with a tall black theme, simply modify the OK.
Change the theme to Darcula under preference-> appearance
And then we'll take a look at the changed theme.
It's cool, there's wood. This is the first stage of Studio brief introduction to Here, followed by the directory structure, shortcut keys, import items, integration GitHub, gradle, etc., please look forward to.