Android Studio Development Preparation

Source: Internet
Author: User

Reprint please mark this article address: http://blog.csdn.net/jianbinzheng/article/details/51232751

Overview

This article mainly shares the settings needed and recommended before using Android studio to develop Android programs, primarily the setup of interface Personalization and simulated debugging (AVD, Genymotion, Night Gods, real machines).

"One, Introduction to Android Studio"

Android Studio is an Android development environment based on IntelliJ idea. Similar to Eclipse adt,android Studio provides integrated Android development tools for development and debugging. On the May 16, 2013, at the I/O Conference, Google launched the new Android development environment. [Baidu Encyclopedia]. Compared to the traditional Eclipse development Android, Android Studio: Smart tips, real-time preview and other direct experience has a greater advantage, deep-seated I do not know 233333. Refer to http://www.zhihu.com/question/21534929

Since Google has stopped its technical support for Eclipse development Android and focused on Android studio support, ADT for Eclipse is no longer updated, so developing Android with Eclipse can be a lot of inconvenience, Beginners starting from Android Studio can be less diligent.

before you develop Android, you need to add three to your environment path ... \jdk\bin;...\androidsdk\tools;...\androidsdk\platform-tools, refer to http://blog.csdn.net/ jianbinzheng/article/details/51149431. Android studio:http://developer.android.com/intl/zh-cn/sdk/index.html

Main interface Display

Note

1, as the path can not be installed when the space

2, use as in the configuration environment must add java_home variables, point to the JDK folder.

3, after installation as has 32-bit and 64-bit options, you must use the same bit with the JDK application.

"Second, personalized settings recommended"

1, as theme settings. There are Darcula, IntelliJ, Windows three, where Darcula is a black theme, IntelliJ is white, and Windows is consistent with the system.

File->settings->appearance->uioptions->theme

 


2, as font size settings. After setting the theme, for other not satisfied with the place can continue to adjust, such as the system default font size is small, you can file->settings->appearance->ui options->override Defaultfonts ... Tick and set font size


3. Code edit area font size. The above two is the adjustment of the software itself, for the code area needs to be modified separately. In File->settings->editor->colors&fonts->font, you need to be aware before you modify, click Save to create a custom mode, avoid modifying the original.



4, File code modification. The IDE Encoding, Project Encoding, Default Encoding for properties in File->settings->editor->file encodings Files three modifications are consistent with UTF-8.

5, modify the automatic reminder mode. File->settings->editor->general->code completion->codesensitive Completion. All is all, none is fuzzy match, Firstletter is the first letter match.



6, plug-in use. Like Eclipse, as also supports plug-in extension functionality, file->settings->plugins settings, and the check box after the item is off, which cancels CVs and Google Login. Click Browserepositiories to search for plugins online.


"Three, Analog debugging"

As the default Android emulator is the AVD. Other commonly used are genymotion (common development), BlueStacks (commonly used in games). In addition, because the above simulator are more professional, need to choose more detailed parameters, looking at the boring beginner can also use other simulators such as Night God, daily and other domestic.

In addition to using the simulator in debugging, you can also use the real machine test, the real machine test can be USB debugging or wireless debugging.

1, AVD settings.

Open AVD Manager

Choose the appropriate size and system version, recommended 5 inches or less, the version of not more than 5.x, appropriate adjustment of the allocation of memory parameters, depending on the computer situation. The first time setting if the computer does not download the relevant content will be downloaded automatically, size hundreds of trillion to 1G bar.

Create a good simulator can start, the first start will be slower, more than a few times will be better, there is to see the computer mood =_= overall or slow, very slow

After the program is written, start running, select Simulator

2. Genymotion Simulator

In addition to using the system default AVD, using Genymotion is a very good choice, fast, smooth, professional. Android Studio uses the Genymotion emulator to download the genymotion (with download VirtualBox), install the Genymotion plugin, select the android version (and download). Genymotion Address: https://www.genymotion.com/

Note

(1) If the download is Genymotion+virtualbox, then install the time to select the installation path. These two things should be put in the same plate.

(2) Encounter unknown problems, you can try to enter the C:\ProgramFiles\Oracle\VirtualBox\drivers\vboxdrv folder (specifically to see their VBox program is installed or place), Locate Vboxdrv.inf This file, right-click the mouse button, and then select Install;

Start genymotion and add "devices". Download and use genymotion need to register and login

Start the emulator, and if it is wrong, wait a few moments before attempting to turn it on (it may not have started successfully in VirtualBox). Still invalid, try starting from VirtualBox, resolving the problem, and then starting from the genymotion. Or try lowering the configuration parameters.

In the setting plugin of AS, browsegenymotion, the download plugin restarts as. The genymotion icon appears above, the first time you click the icon to set the path of Genymotion, that is, the installation path. You can see the devices you have after you click on them, and when you start the device, you will see the device options when you run the program.

3, other simulator use--Take the night God as an example

"Night God" Android Simulator (and others) is mainly used in computer simulation of Android machine, can be downloaded to play Android program, such as the choice of less content, not too much setup, download and other processes, simple and direct. Too avd slow, genymotion to adapt to the machine requirements are not harsh can consider the use of this type of simulator.

[note] If there is an unknown problem, try turning off the antivirus software. Try C:\Program files\bignox\bignoxvm\rt\drivers\xqhdrv\xqhdrv.inf right-click Install.

The configuration process is: Night God download, set up the connection, open the emulator and run the program.

In the environment variable path, add the e:\ application \ Night God Android \nox\bin, and then execute the nox_adb.exe connect 127.0.0.1:62001(cmd) command line. Open the Android simulator and run the program to see our simulator.

4. Real Machine test

Although the simulator is not easy, but if the condition of the real machine is not only fast, but also more difficult to make mistakes, the personal preferred this way, because the mobile phone just can use. Real-world testing requires USB debugging on your phone, configuring the SDK environment, setting up connections, and running programs.

Wired real machine test, need to turn on USB debugging, connected to the computer, in the running program can directly see

Wireless real-computer testing, the Internet provides a lot of methods with plug-ins, here is a method that does not require additional downloads, but requires mobile phones and computers in the same LAN.

First make sure that the Android SDK environment is set up, check the phone's IP address on the phone, and then enter the ADB connect xxx.xxx.xxx.xxx:<port> on the command line. Then run the program in as to see it.

If the following conditions, refer to the http://jingyan.baidu.com/article/295430f1c25a940c7e00500b.html USB connection phone, input settings phone wireless listening port 5555: adb Tcpip 5555. then adb connect IP.

"Note" This method requires that the wired connection is successful before it can be wirelessly connected, and then the USB cable may be unplugged.

Android Studio Development Preparation

Related Article

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.