Self-study Android, regardless of whether the development environment is eclipse or Android Studio, and the Android SDK to deal with, as an Android small white, at the beginning of the installation of the Android development environment, suffering from a variety of egg pain problems, with the solution of various problems, There are some lessons to be learned, and now let's share it with you.
Android Studio is Google's official launch of a professional Android development of the IDE, as Google's pro-son, since the release of the official version has been more and more popular with Android developers, this article only on the Android studio platform for Android development Some of the experience and lessons of studio configuration are summarized, and subsequent problems will be updated continuously.
1. Installation of Android Studio
Download Installation method There is nothing to say, but one thing to pay special attention to, be sure to set the correct JDK installation path, There are many errors are caused by not correctly set the JDK path (about the installation and configuration of Java environment, self-Baidu can), in addition to special attention is: android Studio is actually divided into 32-bit and 64-bit, but two versions use the same installation package. There is only one installation package for Android Studio that is downloaded on the website or at another address, which can be installed either on a 32-bit system or a 64-bit system. After the installation is complete, you can see Studio.exe and Studio64.exe in the bin directory of the installation directory, both of which exist at the same time. studio.exe is running on a 32-bit system computer. The Studio64.exe is running on a 64-bit system computer. Select one to use.
2, the installation and configuration of the SDK (this part of the content is a lot of other people's experience and lessons, thanks to this together)
In the first installation of the SDK, it is really spent a considerable amount of time, I am a big celestial wall has not been able to engage for a long time, ultimately, is to achieve the goal, now to share the lessons.
If the SDK cannot be downloaded due to the inability to turn over the wall, then we will the Android SDK Manager updates the agent configuration in the following ways:
Launch Android SDK Manager, open the main interface, select "tools","options...", pop up the "Android SDK manager-settings" window ;
In"Android SDK manager-settings"window, in the"http proxy server" and "http proxy port"Fill in the Input boxmirrors.neusoft.edu.cn
And80
, and select"force https://... sources to be fetched using http://..."check box. When the settings are complete, click"close"Button off"Android SDK manager-settings"The window returns to the main interface;
Select "packages","reload".
This method at least now can be used, if not you can go to Baidu under other agent port (or I hope that the big celestial can no longer such "closed-doors") in general, the SDK can be downloaded normally, if some options can not be downloaded, and constantly retry may also solve the problem. In addition to setting the proxy port, you can also modify the system host file, VPN and other ways to solve the SDK can not download or download slow problem, this can go to Baidu.
3. What files in the SDK are required because I putAndroid Studio is installed in the SSD, the solid-state capacity is limited and if all the packages are fully downloaded, not only occupy a lot of space and very time-consuming, there are actually a lot of things can not be used, so now to share their understanding of this: according to the official document description
SDK Tools must
SDK Platform-tools must be
SDK platform must have at least one version installed
System Image Recommended installation
Android Support recommends installation
SDK Samples Recommended installationThe system image is followed by the systems image, if you want to use the simulator, this is necessary to install (not all of them installed) the Tools directory is compile-related, which version you want to use;then Android M, Android 5.1.1 These are the SDK, you need to use which version, the SDK Platform download it. documentation for SDK, Samples for SDK, and Source for SDK, don't say you can't read English. If you want to learn, just. all kinds of System Images even, is the simulator, the direct real-machine debugging the fastest and most convenient. Google APIs is then called Google Service and, given the domestic network environment, you're not expected to use it. There are also many good things in the Extras directory. Support Library and support Repository are required. Do not know what to use on their own to Google a bit. The following Google is the beginning of a piece of things are provided by Google interface, domestic use is not. In addition to USB Driver, this is the driver, Windows does not install can not debug. This item on MAC and Linux should be directly grayed out (not available). the bottom Accelerator is the simulator accelerator, which can be used without a real machine debug.
download give a sample image of the various options in the Android SDK manager to visualize the introduction (image of the insight)
here are my own SDK installation options, generally as long as the installation of the following options are OK
Install the above options to work properly, if later in the use of what problems found, according to the error prompts to modify the line.
4, the installation of Genymotion simulatorinstalling genymotion in Android Studio is basically consistent with the operation in Eclipse, and the first thing to do is download the genymotion emulator and install it. Enter Genymotionwebsite, click the Download button, you must enter the mailbox here. If you have already registered, you can enter the mailbox directly. Note that the VirtualBox version is available , and you will need to install both genymotion and VirtualBox as required . after installing the Genymotion application, you need to connect to Android Studio, install the Genymotion plugin in Android Studio and configure it to work as follows: 1, install genymotion plug-in (this Baidu can be a bit)2, installation is restarted as, click on the new Genymotion plug-in icon, the first point to open the need for us to set up a Genymotion installation directory, set up a directory, we click the toolbar icon again can be configured and start the virtual machine. Eg:
Windows: C:\Program files\genymobile\genymotion
3.Startgenymotionapplication, (note not the simulator) and then to thesetting->adbSelectUse custom Android SDK Tools, and then in selectAndroid SDKthe folder. Wait until it appearsAndroid SDK Tools fond successfully, clickOKIt's all right! In this way, you can use genymotion in as.
Some lessons on the configuration of the Android development environment-android Studio