Androidstudio use tutorial (first bullet)
Android Studiois a set of soon-to-be- IDE released (ie, integrated development environment), free of charge to Google and Android developers. Android Studioon the IntelliJ IDEA basis of
Designed Eclipse to replace and ADT ( Android Developer tools) provide developers with better development tools.
Run the corresponding speed, smart tips, layout files timely multi-screen preview and so on are better than Eclipse , but can not say that all is a little now Studio in a window can not manage multiple Project ,
Each Project opens a window, or the current one, and close then opens the other.
When but after all, is the preview version, so it is only a temporary trial under, and not too much contact, development or use Eclipse .
After more than a year of precipitation, if has been to 0.8.4 version, recently prepared in the work with the official start to use, so looked at the Xia Guan Web tutorial. Ready for the start.
-
Installation
This I will not say more, we all know that the official website to download and install. After installing the interface and Eclipse some similar, and then create a new one Project , you will find the prompt to download after completion,
This is in the download Gradle , about twenty or thirty m size, because of the Great Firewall, so it may take a long time, here do not teach everyone, for the program ape is not a problem, we will be scientific Internet.
-
Difference
-
This project non-other project , Android Studio directory structure ( Project ) Represents a Workspace , a Workspace can have multiple Module ,
here The Module can be interpreted as one of the Project in Eclipse .
Project represents a full Android app , and modules is a component of app , and this component can be individually Build,test,debug . modules can be divided into the following categories:
- Java library modules
- Android Library modules: contains Android-related Code and resources, the last generation of AAR (Android ARchive) package
- Android application modules
-
Structure has changed in src< A grouping of main in the/code> directory contains both Java and res .
myapplication is Project , and app is Module .
-
Set up
After entering you will find that the font or style is not in line with your habits.
WindowsUnder Click on the top left corner File Settings , enter the Settings page ( Mac below Android Studio Preferences ), search box to Font find Colors&Font the next Font option,
We will find that the right font size cannot be modified. Changes here must be
To modify it by creating Theme a new one, click Save as Enter a name to change the font.
Some people here may find that my theme is black, IO as demonstrated by the Assembly, but the default is white after installation, some glare. This can be changed by setting the changes in the page Theme ,
By default Intellij , it is Darcula black instead.
It's cool and there's wood.
-
Run
After setting a good font, of course you have to go.
Run and Eclipse compare like in, click the green arrow. You can choose a different Module shortcut Shift+F10 by using the drop-down menu on the left of the arrow.
AndroidStudioThe default installation launches the emulator and can be configured if you want to install it on a real machine. In the drop-down menu, select Edit Configurations Select Prompt or USB device.
-
Introduction to Common shortcut keys
AndroidStudioYou can set shortcut keys in the shortcut keys in Eclipse the. The specific method is to search in the Settings page keymap and then select Eclipse Yes.
People with obsessive-compulsive disorder can't afford to use the default shortcut keys.
Here I tidy up a few of the most commonly used shortcut keys. Everyone's habits are different, everyone picking
Ctrl+SA joke, this key is completely wasted, becauseAndroidStudioAndEclipseDifferent, he is automatically saved, so we no longer needCtrl+SThe.
Ctrl+空格Code hints (same asEclipseInAlt+/)
Ctrl+Shjft+NFind Files (sameEclipseInCtrl+Shift+R)
Ctrl+F12Displays the structure of the current file (same asEclipseInCtrl+0)
Ctrl+Alt+LFormat (same asEclipseInCtrl+Shift+F)
Ctrl+Alt+OOptimized imported packages (same asEclipseInCtrl+Shift+O)
Ctrl+QView Documents (sameEclipseInF2)
Alt+F7Search (sameEclipseInFile Search)
Alt+InsertCreate a new file or generate code (GetSet) (sameEclipseInAlt+Shift+S后的操作)
Alt+EnterQuick fix (sameEclipseInF1)
Ctrl+PShow method parameters
Shift+F10Run the project
Ctrl+Shift+BackspaceJump to the last modified place
Ctrl+EShow recently edited list
Ctrl+[或]Jump to the beginning or end of curly braces
Ctrl+Alt+TPackage the code together (add try catch, etc.)
Alt+↑或↓Move between methods
Ctrl+Shift+F7Highlight the code selected in this file
Alt+←或→Toggle Open Files View
Shift+F6Renaming
Ctrl+BQuickly open the class or method
F2Quickly navigate to a file error or warning location
Ctrl+XCut when moving forward
Ctrl+YDelete When moving forward
Ctrl+DCopy when moving forward
F4Enter the source code
Alt+1SwitchProjectView
Ctrl+_F4Close the current window
- Email: [Email protected]
- Good luck!
Androidstudio use tutorial (first bullet)