Constantly updated ...
Download
All Versions As:http://tools.android.com/download/studio
Official Stable release: http://developer.android.com/sdk/index.html
-Stable Channel: official version channels
-Beta channel: Test version channels
-Dev Channel: Development release Channel
-Canary Channel: Preview the release channels
In the above 4 channels, the Stable channel is the most stable, the problem is relatively small, Canary channel can obtain the latest version, the problem is relatively more.
Gradle
Gradle is a project automation building tool based on the Apache Ant and Apache maven concepts. It uses a particular domain-specific language based on groovy to declare project settings, rather than traditional XML.
Currently its supported languages are limited to Java, groovy, and Scala, and plans will support more languages in the future.
–wikipedia
App/build.gradle file Analysis
This is the configuration file for the entire module.
//declaration is an Android program apply plugin: ' Com.android.application ' Android {//Compile SDK version compilesdkversion 21//build Tools version Buildtoolsversion "21.1.1" Defaultconfig {//Applied package name ApplicationID "Me.storm.ninegag" minsdkversion Argetsdkversion versioncode 1 Versionname "1.0.0"}//Java version compileoptions {sourcecompatibility javaversion.ve Rsion_1_7 targetcompatibility javaversion.version_1_7}buildtypes {debug {//debug mode} release { Whether to confuse minifyenabled false//confuse the location of the file Proguardfiles getdefaultproguardfile (' Proguard-android.txt '), ' proguard-rules.txt '}}//remove lint check errorlintoptions {abortonerror false}}dependencies {//Compile Libs directory for all JAR packages compile Filetree (dir: ' Libs ', include: [' *.jar ']) compile ' com.android.support:support-v4:21.0.2 ' compile ' com.etsy.android.grid:library:1.0.5 ' compile ' com.alexvasilkov:foldable-layout:1.0.1 '// Compile the Shimmerandroid module in the Extras directory Compile project (': Extras:shimmerandroid ')}
Description: Android SDK directory and analysis of the role of the detailed
Debugging features using
Reference: Intellij idea Debug Feature Usage summary
ADB cannot start
The Event log is:
adt-bundle-windows-x86_64-20140321\sdk\platform-tools\adb.exe,start-server‘ failed -- run manually if necessary11:54:56 error: could not install *smartsocket* listener: cannot bind to 127.0.0.1:5037: 通常每个套接字地址(协议/网络地址/端口)只允许使用一次。 (10048)
The reason is that the port used by ADB server is occupied by other programs, causing it to fail to start normally.
In Terminal input:
You can see which process occupies the port and get the PID. Then find the process in Task Manager and close it.
Some error analysis
-
-
Duplicate Entry:android/support/v7/appcompat/r$anim.class Error
Reason: The Internet is generally said to be multiple V7 package version caused by different. But my project has been running normally and there are no conflicts. This error only occurred after upgrading from Android Studio 1.5 to 2.0 beta. The specific reason is unclear.
Solution: According to StackOverflow last answer, should be gradle wrapper problem.
Execute the command under the project root: Gradlew Clean is available. (./represents the root directory). More about the Gradle command reference: Android Studio Series Tutorial Five –gradle command in detail with importing a third-party package
-
-
Error:execution failed for task ': Batman:transformresourceswithmergejavaresfordebug '.
Com.android.build.api.transform.TransformException:com.android.builder.packaging.DuplicateFileException: Duplicate files copied in APK Meta-inf/maven/com.squareup.okio/okio/pom.xml
Solution: Refer to StackOverflow an answer. In the Build.gradle file, add:
packagingOptions { exclude ‘META-INF/maven/com.squareup.okio/okio/pom.xml‘ exclude ‘META-INF/maven/com.squareup.okio/okio/pom.properties‘ }
-
- Java.util.zip.ZipException:duplicate Entry:tencent/mm/sdk/a.class
Duplicate entry is generally because a third-party library is repeatedly referenced, or the same package is referenced locally and gradle. TENCENT/MM/SDK This package is a payment package, if you also use the Friend League social sharing, its SDK has a Socialsdk_weixin_1.jar package, the content and TENCENT/MM/SDK are exactly the same, resulting in duplicate references. You should also pay attention when sharing and paying with the Friends Union.
The solution is to delete the Socialsdk_weixin_1.jar package.
Reference article:
1. Android Studio Simple Setup
Android Studio usage Issues ingest