========================================================
Qiujuer
Blog: Blog.csdn.net/qiujuer
website: www.qiujuer.net
Open Source Library: genius-android
Reprint Please specify Source: http://blog.csdn.net/qiujuer/article/details/41843095
========================================================
Yesterday I saw the official version of Android Studio 1.0 released; I'm very happy.
As a loyal user, from the beginning of last year, the developer conference began to appear as the beginning of the use of, but from then on basically did not use Eclipse, along the way, encountered a BUG, also constantly go abroad to find resources to find solutions. The staff were very friendly.
Here do not talk about the specific source code editing, just say how to download the configuration until simple use.
Download Gradle
What is this? A sentence is not a word, or Baidu
Home Latest Gradle-2.2.1-all.zip
The download can be extracted to the location you want, preferably with your development environment directory, you can download multiple versions, placed in a directory reserved.
Android Studio
: https://developer.android.com/sdk/index.html may need to turn over the wall, specifically can look at a chapter: [Android] Environment configuration of the basic development environment (Sdk/android Studio)
You can see directly after entering:
But a careful friend should see this at the bottom:
A total of 3 versions:
The most complete android-studio-bundle-135.1629389.exe of more than 800 MB
Https://dl.google.com/dl/android/studio/install/1.0.0/android-studio-bundle-135.1629389.exe
Android-studio-ide-135.1629389.exe does not include the SDK installation package (MB)
Https://dl.google.com/dl/android/studio/install/1.0.0/android-studio-ide-135.1629389.exe
Android-studio-ide-135.1629389-windows.zip Green version without SDK
Https://dl.google.com/dl/android/studio/ide-zips/1.0.0/android-studio-ide-135.1629389-windows.zip
The above links can be downloaded directly using Thunderbolt and other tools. I am downloading the green version here, and there is a corresponding explanation for the SDK in the [Android] environment configuration (sdk/android Studio).
Start
After the download decompression, into the Bin, to find the corresponding system startup file startup is OK, but the premise is to have a Java environment. Also explained in the previous chapter.
First boot:
If you originally have the corresponding settings export file can be directly imported settings, no choice of the second, is generally the second more.
Start loading ...
Use
The SDK configuration will be performed after the first entry (if the full version is downloaded, then no configuration is required)
Here we directly select the directory of the SDK we normally use, then click Finish.
Recommendation: At this point, I suggest to break the network settings, so that the link network to refresh the SDK for some things (if you set up the directory with the SDK), and because of the situation in the country, basically need to wait a few hours to complete (mine is this). So it is suggested that the network does not flush directly past.
Because the network is broken, it can be directly FInish. The boot process is finished.
Main interface
Here we first import a project
Click Import Project, then select a project that you originally developed, which can be created by Android Studio. It can also be the Gradle project that was exported after Eclipse was established.
The meaning of this is to download the generated Gradle in the project or to introduce the Gradle in other places on the local site;
If you click OK, the first time you will be connected to the Internet to download the latest matching Gradle, and then copy a profile to the project for development, so if you choose OK the first time will wait a longer time. Not anymore, because there will be caches in the C-drive user directory.
- Of course, here I recommend using your own downloaded Gradle, the benefits are more:
- Convenient management Gradle
- Multiple versions of Gradle can be downloaded for backup
You can use different Gradle for different projects.
Select Gradle:
Since the Android Studio 1.0 official version uses 2.2.1, you need to choose 2.2.1
Next
There are some downloads involved, and of course this time it's connected.
When you are done, you will be able to enter your project. Since the interface is almost the same as the new, I put it in the new section.
New Project
Click File-new Project:
Take a name, enter a location, and then the next step. Finally enter the project:
In Android Studio, a project contains multiple models, meaning that a project can contain multiple modules.
Now we create a new library module (model)
New Model
File-new Model
Select your Model type and the next step. Here I choose an Android Library.
What is the Android Library ? The Android Library can have resource files such as interface/resources/fonts/services and so on under the normal mobile phone Modle project, but it cannot be started independently, and it needs to be started by calling the main Model. The common UI Library is the Android library.
Also take a name for the operation, next:
Choose an interface, or you can not;
Completed, now there are two plates in the project; one is the default APP and one is the library Model we built.
Configuration
You can see that each project has a build.gradle This is the configuration file for the Gradle build tool. The gradle:1.0.0 here corresponds to Gradle 2.2. Version 1 .
Look at the APP's configuration file:
To introduce the model into the main APP model:
Enter settings: Select by Image:
Then select the name of your Model, after confirming:
Now look at the APP's build.gradle file:
is not more an introduction to the configuration.
Change to Black skin file-settings
OK, that's almost it.
If there are other areas that you do not understand, you can bring them up.
========================================================
Qiujuer
Blog: Blog.csdn.net/qiujuer
website: www.qiujuer.net
Open Source Library: genius-android
Reprint Please specify Source: http://blog.csdn.net/qiujuer/article/details/41843095
========================================================
[Android] Environment configuration of the official version of Android Studio 1.0