Android studio 1.x problem summary, android1.x
Android Studio is an Android Development Environment launched by Google at the 13-year I/O conference. Based on IntelliJ IDEA. Similar to Eclipse ADT, Android Studio provides integrated Android development tools for development and debugging.
In December 10, Google released the official version 1.0 of Android studio. It added new features including intelligent code editing, user interface design tools, and performance analysis tools, supporting development of the Android 5.0 platform, it also provides multi-platform support for Windows, Mac, and Linux.
Download
Open the android sdk official website for download. The website will automatically provide a download link based on your current platform.
Windows: the installation package is provided for Windows. After installation, it contains necessary components for Android studio 1.0.1 and android sdk 5.0.1.
Linux: The downloaded package for Linux seems to only contain the compressed package of Android studio 1.0.1. The android sdk needs to be downloaded separately and only has basic sdk components, which is insufficient for development.
Install
WIndows: double-click the installation button. You can select the installation path of studio and sdk during the installation process.
Linux: I have installed it in ubuntu. (It is recommended that you set the JAVA_HOME environment variable.) jdk 1.7 or later is required. During the installation process, You must select the path of the sdk and jdk.
Problem Summary
1. How to update android sdk in China?
For some well-known reasons, we cannot directly connect to the android sdk Update Service to update the sdk, therefore, common sdk components such as android platform-tools, samples, build-tools, and system image can be directly downloaded and added to the official website's sdk for use through the ftp site in China.
A recent ftp site: http://mirrors.neusoft.edu.cn/android/repository/
Of course, you can also directly update the vpn, but it is also slow.
2. Solve the Problem of loading Fetching android sdk component information
After the installation is complete, if you start it directly, Android Studio will obtain information about the android sdk components. This process is quite slow and often fails to be loaded. As a result, Android Studio cannot be started. The solution is not to obtain the android sdk component information. The method is as follows:
1) Go to the bin directory under the installed Android Studio directory. Find the idea. properties file and open it in a text editor.
2) add a line at the end of the idea. properties file: disable. android. first. run = true, and then save the file.
3) Close Android Studio and restart to enter the interface.
This solution is provided by @ sonyi of cnblog and is available.
If this modification is not made, Android Studio checks for updates every time it is started.
3. Gradle DSL method not found: runProguard ()
After upgrading gradle or importing some non-Android studio projects, you will find the following error:
Gradle DSL method not found: 'runproguard ()'
After reading the official documentation (http://tools.android.com/tech-docs/new-build-system) found that in the new version of gradle, runProguard this method has been abandoned, and changed to the new method: minifyEnabled. therefore, the correct solution is not to modify the version number of gradle, but to build each Module in the project. change the runProguard method name in the gradle file to minifyEnabled.
So the modification is as follows:
Original
buildTypes { release { runProguard false proguardFiles getDefaultProguardFile(proguard-android.txt), proguard-rules.pro}
Modify
buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile(proguard-android.txt), proguard-rules.pro}This is what we write first.