"declaration"
Welcome reprint, but please keep the original source of the article →_→
Life One number: http://www.cnblogs.com/smyhvae/
Article Source: http://www.cnblogs.com/smyhvae/p/4390905.html
Android Studio Download Green channel:http://www.androiddevtools.cn/
First, Installation:
After the Android studio installation is complete, the first time you start as, to avoid re-downloading the new version of the SDK, you need to do the following:
To open the installation directory before start, add a line to the bin directory's idea.properties file first: disable.android.first.run=true, avoid automatically re-downloading the SDK the first time you open as. Right-click on Mac platform->show package Contents found the bin directory.
The first time you open Android Studio, you need to configure the JDK and SDK:
, select "Project Structure" and the following interface appears: (Select the path to the JDK and Android SDK)
Note: Don't ask me how the JDK and Android SDK came from? To install well in advance, this kind of post a lot of search, not my writing style.
Second, create a new Android Studio project:
Once you've configured your JDK and Android SDK, you're ready to start a new Android project:
, after you have set the project name and path, you can follow it all the way next:
If the user installs Android Studio for the first time, the following window will appear:
, is downloading the latest version of the SDK (API 23), downloaded in a few minutes, because the visit is a foreign site, recommended FQ. Continue to the next step:
, click the "Finish" button and the app is ready to be created.
If the user installs Android Studio for the first time, the following window will appear:
, is in the download Gradle, the file is not big, about a few 10 trillion bar, download up quickly. Since the visit is a foreign site, it is recommended to FQ.
Third, the simple settings of Android Studio:
1. Subject Modification:
Perhaps people will think the software interface is not very good, we can change the theme. Select the menu bar "File--settings--apperance--theme", the theme Select Darcula:
2. Import third-party topics:
The system offers two themes that may not look good, and we can go to the website http://color-themes.com/to get third-party themes, such as the sublime theme that I personally love:
, after downloading it, is a jar package. How do I import it into Android studio?
Don't worry, go back to Android Studio and choose the menu bar "File-import Settings" to import the downloaded jar package.
3, Code font modification:
Select the menu bar "File--settings--editor--colors&fonts--font":
You can also modify the console font:
After the modification, I found that some of the default fonts for the AS, such as the sidebar of the project directory font has not changed, if you want to change it, then change it (I generally do not change), modify as the default font:
4. Close the update:
As shown in the following:
5, shortcut key habits of modification:
If you want to change the usage of the shortcut to eclipse, you can choose the menu bar "File--settings--keymap":
I'm not going to change it here, huh?
6. Add API document hover hint:
As the default is no API document hover prompt, only press and hold "ctrl+q" too will appear prompt. If you want to add an automatic hover hint for the API, set the following:
, in the red box part of the hook on the line, but doing so on the computer's performance consumption will increase, can not be set, according to personal habits.
7, the configuration code automatic prompt: (the new version as default has the Code automatic prompt setting)
The new as default has the function of code auto-completion (old version of As is not), automatic completion of the following settings:
Keep the upper red frame part out of the tick state, you can set the code to auto-completion.
The shortcut keys for code hints are in the following location:
, enter "class name completion" In the search box, see the code hint of the default shortcut is ctrl+alt+ space, if you want to get rid of this shortcut, the operation is as follows:
, right-click the Red-box section and modify it in the pop-up dialog box.
Note: If you are accustomed to using eclipse, but be aware that "alt+/" in Android Studio is another shortcut key:
People who are accustomed to using eclipse can swap the two keys of the Red box section.
To configure the case sensitivity of code hints:
As the default code hints are case-sensitive , do not look at the letter. We enter the lowercase intent, which indicates the following effect:
When you enter the uppercase intent, the prompt effect is as follows: (at this time only the intent class appeared)
As you can see from the above two graphs, the default code hints are case-sensitive . So I want to make as insensitive to case, how do I do it? The operation is as follows:
, we change the part of the arrow to "none". The demo works as follows:
CTRL + Click the mouse to view the source code: (New as has the default setting)
If the SDK has been successfully loaded, this is actually set in the shortcut key:
The shortcut key in the Blue bar box in the section means: Hold down the CTRL key and click the mouse to view the source code.
8, set the Automatic guide package:
Prior to eclipse, we had to guide the package each time we referenced some classes, and as could be set to auto-guide. Settings are as follows:
, check the two locations of the red Ore section.
9. Display the number of lines of code:
, the red frame part is ticked.
10, prohibit automatically open the last project:
I like to choose which project to open, decisively disable (this according to personal preferences ha), set as follows:
11. Prohibit code Folding:
Intellij idea By default there are many places where the code will automatically collapse, but I don't like it, so I canceled, set the following:
12, modify the comment location, disable "statement heap line":
- Comment at Frist column: If enabled, the position of the note will be at the beginning of the line, otherwise the annotation will be indented. I canceled it.
- Control statement in one line: When formatting the code, it merges a few short statements into one row. I think this affects the readability of the code, it is canceled.
13. Modify the new file header:
Every time you build a new class, you must be familiar with the following comment.
/*** Created by smyhvae on 2015/5/7.*/
In fact, it is set in the following position:
14, the modified file code for UTF-8:
Android Studio 1.1 is the default encoding method is Utf-8, to the Android Studio 1.2 default encoding method unexpectedly is GBK, to the Android Studio 2.1, the default part encoding method is Utf-8, We still set as UTF-8, do not pit teammates OH:
Initial settings for Android Studio