随着Google为自家“儿子”推出了新的ide——Android studio,并不再更新eclipse,对于Android开发者而言,改用Android studio是势在必行了,作为一名学生党,自学Android也有一段时日了,从当初一开始用eclipse到现在尝试改用Android studio,发现Android studio确实比eclipse好用很多,毕竟Android studio作为Google为Android专门开发的IDE。
Android Studio Configuration
首先下载Android studio,到Android studio官网:http://developer.android.com/sdk/installing/studio.html,由于国内环境和谐,导致登录官网失败,所幸国内有非常好用的镜像网站:http://www.androiddevtools.cn/,里面可以下载到Android开发所需的各个环境的开发包和工具。下载完Android studio安装包后,直接安装就可以,要注意的是,在运行studio前要安装好jdk并配置好环境变量
To create a new system variable:
Variable name: "Java_home"
Variable value: "C:\Program files\java\jdk1.7.0_51"; This is the JDK installation path, which is filled in according to the location you installed.
Locate the path selection editor in the system variable:
At the end add "\;%java_home%\bin;"
Run Androidstudio, first create project, Android Studio go back to download Gradle related profile, default is C:\user\administrator.gradle, download takes a long time, the solution is: open \ c \ Under the C:\user\administrator.gradle\wrapper\dists\gradle-2-1-all\78sad99a0dasd0n55 folder under User\administrator.gradle, can see the Gradle-2-1-all.zip. part file, know this version number, we can download the corresponding version of the file, download it and put it under this file, do not unzip, so when the new project does not need to download gradle, just download some jcenter of the dependency package, these are very fast.
Update SDK
Open the SDK Manager on the Android Studio toolbar first, and if you see a series of connection refuse prompts, you'll need to select the Tools,options option in the SDK Manager's menu bar. Enter the setting proxy IP and port (you can find the latest mirror address and port on the Androiddevtool website again), then tick "force Https://...source to be fetched using http://...", HTTP instead of HTTPS requests, you can download the SDK and emulator tools when you are done.
Import Project
The solution to die when importing the project:
Because Android Studio makes version updates, and a project uses gestures gradle1.5 to compile but does not have this version locally, Android Studio is ready to download the version, which can cause the card to die because we may not be able to access these resources properly.
We can start with the current version of the Gradle to create a normal project, ensure that it can be compiled, and then use the "Gradle" folder in the local project and the Build.gradle file to replace the items to be imported to the two folders, and then open the project can be compiled properly.
Android Reading notes--android Studio installation configuration