Android Studio version 1.2 installation setup graphics and text tutorial _android

Source: Internet
Author: User
Tags versions

The two days Google updated the official version of Android Studio 1.2, the new version of the settings interface big change, the set of entries are older versions of the collation, not as before the list of long.

Take advantage of the opportunity to install a new version, record the common settings, and put them in the blog to make a memo.

Download
The official version of the Android studio and SDK can be downloaded from the link below
Http://developer.android.com/sdk/index.html
For downloads, I recommend downloading the green version of the Android studio and SDK, and not the bundled version of the package, so if there's a problem to reload, just move one.

Other versions can be found here http://tools.android.com/download/studio/canary

Disable shortcut keys for ctrl+space to switch input methods in Windows
Windows Ctrl+space Shortcuts (toggle Chinese Input method) conflict with a bunch of Ides, so you must disable them and modify the registry as shown in the following figure.
or download my modified registry file (right key to Save As), double-click the file to import the compressed package, restart the system.

Principle reference here.

Environment variables
Many Ides rely on environment variables to properly set environment variables to ensure that the software works properly and to avoid many inexplicable and wonderful problems.


To set the environment variable, search yourself. The following environment variable values are my own computer, please follow the actual situation to modify.
There are path to pay special attention to, to add to the back of the original, do not cover all the forehead.

About download, tools in the Android SDK Build-tools recommended all downloads,
Other API versions, we recommend that you download at least the SDK Platform (must, the framework layer is all here) and sources for Android SDK (source code),
Extras must download the Android Support repository and Android Support library (Support library, which is now developed without Support library),
The above mentioned is the development must use, the other thing depends on the situation, you have the time and do not care about the resources occupy words, full download all the line.
By the way, attach my own download, jab this connection view.

modifying idea.properties files
Find the <android-studio>\bin\idea.properties file, open it, and change it:

Copy Code code as follows:

# automatically check and upgrade the Android SDK when running Android studio for the first time
Disable.android.first.run=true
# Below are two directories for Android studio settings, Plug-ins, and other files generated by the runtime
# Don't change, Windows defaults to c:\users\<username>\. Androidstudio.2\ inside
# ${idea.home.path} represents the home directory of the Android Studio program, note that the directory separator should be with a forward slash "/"
idea.config.path=${idea.home.path}/. Androidstudio.2/config
idea.system.path=${idea.home.path}/. Androidstudio.2/system

Ps:

The very pit dad is that every time an Android studio is upgraded, it forces the detection of the files or folders in the as home directory to be passive.
And of course it contains this idea.properties,
Some enhanced templates or plug-ins, such as this androidstudiotemplate, require overlay <android-studio>\plugins\android\lib\templates when installed.
If found to be changed, it will require processing (restore the default) operation, for example, Idea.properties and the templates will be restored to the appearance of decompression, the various changes will be invalidated.
So for the sake of insurance, this idea.properties file after the backup, after the upgrade as, manually changed back, a variety of plug-ins/templates also save a backup, do not install the end of the deletion, so that by the as the upgrade program deleted and can not find back.

Set up Android Studio

Come to the point, after running, into the welcome interface, do not rush to build the project, first configure→settings to modify the settings.

IDE Appearance & Behavior

Modify the theme, modify the global font

Change the theme, want to use cool dark theme, change into Darcula bar;
Font, choose one with Chinese, or there will be a lot of mouth, I use the Microsoft Yahei UI, very good. Enable/Disable animation effects, disabling the feeling may be faster.
prohibit automatic opening of last project
I like to choose which project to open, decisively disable

Setting up a network proxy
The same as above, to the Red Apricot public agency bar

Disable automatic check update

The choice of cleanliness, upgrade control please disregard

Configure shortcut keys
Whether you change, anyway, I did not change, the default is good, so as not to check the data, operation is not on the

Editor
Mouse hover display document, Formatting & Guide Package Tips

The mouse pointer hovers over a number of times, displaying the document and changing the time yourself. is to press format Code or guide package, whether will show a dialog box, feel annoying, all canceled it, anyway, I canceled.
Show line number, Show method separator line
Hook it up, you deserve it.

Code Folding
IntelliJ idea there are many parts of the code can be folded automatically, but I do not understand, so canceled, here is a matter of opinion, look at the office
P.S. Ctrl +. Can collapse and expand code

Code Intelligence Tips

What characters will be prompted, all (the case is all consistent), None (regardless of the case, in accordance with the prompt), (first letter) (a single character conforms to OK, other random). I have no memory of the brain, of course, choose None. Automatically pops up the document, the time looks to do. Automatic Pop-up method parameters prompt, time to see do.
Automatic Guide Bag

Optimize imports on the fly: optimizes the Guide package, and when formatting the code, it deletes the redundant guide package. Add unambiguous imports on the fly: knocking a simple class name on the code will help you guide the package.

Create a personal code style configuration
The estimate is to protect the default code style configuration, so that users can break the configuration is also able to restore a key, idea does not allow the modification of the default configuration, users need to create a configuration to make changes.
Choose which theme to base and save as a.

Modify Code Font
It is highly recommended to use Consolas font, good-looking!!!

modifying console Fonts
Well, I just love this font, okay?

Logcat fonts
If you want to change it, you have to cancel the 1 in the first place.

To modify the comment location, disable the statement heap line

Comment at Frist column: When enabled, the annotation symbol is at the beginning of the line, otherwise the annotation is entered as indented. I canceled it. Control statement into one line: When formatting code, a few short statements are merged into one row. I think this affects the readability of the code, so cancel.
Modifying a variable prefix
Static member is S, ordinary member is M, somewhat meaning

Modify new file Header
Each time you build a new class, you must be familiar with the following note.

Copy Code code as follows:

/** * Created by Licheetec on 2015/5/2. */

The image above is the common file header, the box to live in the place is your system username, want personalized words, you can change here, as to where to quote this file head, right next door.

Modify file Encoding to UTF-8
Do not pit teammates, small partners are unified instead of UTF-8 bar.

Experience Enhancement

Enhanced Live Templates (ctrl+j Smart tip template)
The default live templates are not enough, not even a foreach, but fortunately GitHub on the great God made an enhanced template, decisive to use.

Copy Code code as follows:

Idea-live-templates:https://github.com/keyboardsurfer/idea-live-templates

After downloading the file, locate the following directory:
Copy Code code as follows:

<android-studio>\. Androidstudio.2\config\templates,

As for why it is this directory, trouble ahead to amend the idea.properties file,


If you don't have a templates folder, you can build one manually.

Get all the *.xml files into that folder and reopen Android Studio to see the effect.

foreach to change a setting, otherwise for ($i $: $data $) {will be automatically formatted as multiple lines.
The following is a demo of the Foreach and FBC movement diagrams

おわり

Done, Android Studio Basic Setup Tutorial This is the case, later there are new things to update, other compile system related to the temporary is not touched very clearly, do not fraught.
you are tired.

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.