Development Preparation in Http://www.cnblogs.com/dev2007/p/4059829.html
The main introduction to the construction of the basic environment, development tools are mainly eclipse, due to the use of Android studio more and more extensive, this article for Android Studio related brief description.
First recommended
Website 1:http://www.androiddevtools.cn/almost all Android related tools can be downloaded on it.
Website 2:http://www.android-studio.org/android Studio's Chinese community
1. Android Studio Download
- Choose your own system-matching version from http://www.androiddevtools.cn/#android-studio download.
- Download from Http://www.android-studio.org/index.php/download, if you do not have the SDK tool installed, you can choose the recommended version, which contains the SDK.
2. After the installation is complete, the SDK mirroring address configuration (for students who do not use VPN)
Follow the tutorial reference on the http://www.androiddevtools.cn/home page
about Gradle(The following example is the builde.gradle of Module:app)
Apply plugin: ' Com.android.application ' android {compilesdkversion buildtoolsversion ' 23.0.1 ' defaultconfig { ApplicationID "Com.awu.kanzhihu" minsdkversion targetsdkversion versioncode 1 ver Sionname "1.1.20160120"} buildtypes {release {minifyenabled false proguardfiles getd Efaultproguardfile (' Proguard-android.txt '), ' Proguard-rules.pro '}}}dependencies {compile filetree (dir: ' Li BS ', include: [' *.jar ']) testcompile ' junit:junit:4.12 ' compile (name: ' Roundedimageview ', ext: ' aar ') compile ' co m.android.support:appcompat-v7:23.1.1 ' compile ' com.android.support:design:23.1.1 ' compile ' Com.mcxiaoke.volley: library:1.0.19 ' compile ' com.google.code.gson:gson:2.2.4 ' compile ' com.android.support:cardview-v7:23.1.1 ' Compil E ' com.android.support:support-v4:23.1.1 ' compile ' com.umeng.analytics:analytics:latest.integration ' compile files ( ' LIBS/UMENG-UPDATE-V2.6.0.1.JAr ')}
Brief description:
Apply plugin: ' Com.android.application '
Indicates that the module is an app, that is, our APK project, plus the Library project (module project in Android Studio).
Android { compilesdkversion buildtoolsversion "23.0.1" defaultconfig { ApplicationID " Com.awu.kanzhihu " minsdkversion targetsdkversion versioncode 1 versionname" 1.1.20160120 " } Buildtypes { Release { minifyenabled false proguardfiles getdefaultproguardfile (' Proguard-android.txt '), ' Proguard-rules.pro '}}
It is possible to configure the APK compilation tool version, compile the SDK version, the appropriate version (originally should be written in the androidmainfest.xml, such as the Minimum SDK version, the SDK version, Android Studio by default, such as the above code. See also Project build.gradle (Module:app))
dependencies { Compile filetree (dir: ' Libs ', include: [' *.jar ']) testcompile ' junit:junit:4.12 ' compile ( Name: ' Roundedimageview ', ext: ' AAR ') compile ' com.android.support:appcompat-v7:23.1.1 ' compile ' com.android.support:design:23.1.1 ' compile ' com.mcxiaoke.volley:library:1.0.19 ' compile ' com.google.code.gson:gson:2.2.4 ' compile ' com.android.support:cardview-v7:23.1.1 ' compile ' com.android.support:support-v4:23.1.1 ' compile ' com.umeng.analytics:analytics:latest.integration ' Compile files (' Libs/umeng-update-v2.6.0.1.jar ')}
Configure the library to be used by the project
1. After this lib,gradle configuration name is available in the Remote server library, the Lib is automatically downloaded from the remote and does not need to be added locally
2. Locally added lib, also to be added in the way referenced by files
Other uses:
Compile multiple apk according to different parameters (such as androidmainfest.xml need to add channel value to differentiate different apk)
About Git
If the project itself is managed by Git, in Android studio, adding a version management Add root to the project directly (if you report an exception that git can't find, you need to install Git software), there will be a version management icon in the menu item, and a visual operation is relatively convenient.
Android Development Handbook-android Studio Special article