Android Studio development Environment issue record

Source: Internet
Author: User

The UI is garbled in the font below the setting theme, and selecting a font that supports Chinese is OK.
Advantages of building Android projects with GradleUsing the same build system to optimize dependency management in the IDE Environment and command line, the powerful dependency management based on Apache Ivy is easier to integrate into an automated build system that supports transitive dependency management without the need for a remote repository or a pom.xml and ivy.xml configuration file. Use domain-specific language (DSL) description and processing build logic Android Gradle automatically remove useless resources
  
 
  1. android {
  2. buildTypes {
  3. release {
  4. minifyEnabled true
  5. shrinkResources true
  6. }
  7. }
  8. }
Android Studio on Gradle environment settings Android default to use local, can also use global.
For local or global use, there are answers on StackOverflow, and it is recommended to use the global http://stackoverflow.com/questions/24811997/ Android-studio-use-default-gradle-wrapper-vs-use-customizable-gradle-wrappeupdate the configuration with Gradle wrapper GradleAdd the following task to the Build.gradle file and fill in the version to which you want to update.
 
   
  
  1. task wrapper(type: Wrapper) {
  2. gradleVersion = "2.3"
  3. }
Then execute the gradle Wrapper command to update the wrapper file.
This will update the two files under the project directory.
 
   
  
  1. # modified: wrapper/gradle-wrapper.jar
  2. # modified: wrapper/gradle-wrapper.properties
  
 
  1. -- - a / androidkit / gradle / wrapper / gradle - wrapper properties
  2. +++ b/androidkit/gradle/wrapper/gradle-wrapper.properties
  3. @@ -1,6 +1,6 @@
  4. -#Wed Apr 10 15:27:10 PDT 2013
  5. -distributionBase=GRADLE_USER_HOME
  6. -distributionPath=wrapper/dists
  7. -zipStoreBase=GRADLE_USER_HOME
  8. -zipStorePath=wrapper/dists
  9. - distributionurl = http\: // services gradle org / distributions / gradle - 1.10 - all zip
  10. +#Tue Jun 24 20:40:58 CST 2014
  11. +distributionBase=GRADLE_USER_HOME
  12. +distributionPath=wrapper/dists
  13. +zipStoreBase=GRADLE_USER_HOME
  14. +zipStorePath=wrapper/dists
  15. +distributionUrl=http\://services.gradle.org/distributions/gradle-2.3-bin.zip
Then execute the Gradlew in our project and it will start downloading the Gradle-2.3-bin.zip and automatically unzip the installation and initialize it.
If it is downloaded to the following address:
 
   
  
  1. C:\Users\msdx\.gradle\wrapper\dists\gradle-2.3-bin\49f3a49i7r03k2
As for this garbled folder directory (above the 6VPVHQU0EFS1FQMQR2DECQ1V12), my processing is to open the Android studio first, and then close, this directory is generated (note that This directory will be reborn as a random code folder every time you find a new version to download, so don't try to put the zip file in the last random code directory, and there will be a new download for the Mao version as well.

Here's a question of where to download. Is the zipstorepath in the config file, but where is gradle_user_home? Official documentation says:
 
   
  
  1. gradle_user_home
  2. Li style= "list-style-type:none; padding-left:0px; "class=" L1 "> specifies the gradle user home directory ( Span class= "PLN" >which defaults to " user_home /. gradle " if not set Span class= "pun").
http://blog.csdn.net/maosidiaoxian/article/details/34135761 Android Studio Card in download Gradle yourself to https:// Services.gradle.org/distributions download the appropriate version and put it in the corresponding directory and restart studio. Android gradle command line compiled into the project directory compiled, this step will sometimes download a lot of dependencies, but also re-download Gradle, re-build a random string directory.
 
   
  
  1. gradlew build
Installing the Debug version
 
   
  
  1. gradlew installDebug
View task
 
   
  
  1. gradles tasks
Additional commands to add Android Gradle multi-channel packaging
 
   
  
  1. <meta-data
  2. android:name="UMENG_CHANNEL"
  3. android:value="Channel_ID" />
Implementing multiple channel This series of Android studio tutorials is goodAndroid Studio Series Tutorial six--gradle multi-channel packagingHttp://stormzhang.com/devtools/2015/01/15/android-studio-tutorial6/Android gradle Multi-pack name package using Productflavors, Make the compiled package name different. This series of official documents translated dry, official documents is the best place to speak. Android Official technical document translator--applicationid and PackageName http://blog.csdn.net/maosidiaoxian/article/details/41719357
With a simple test example, it is OK to package the package name, but if you use authority in the project, you have to continue with the configuration, such as ContentProvider, syncadapter components. Refer to the following answer, and similar to the "Your.syncadapter.type" These fields are not associated with our package name or Java package name, you can randomly take, as long as the use of the same place is OK. Using build types in Gradle to run same app, uses ContentProvider on one device http://stackoverflow.com/questions/167 77534/using-build-types-in-gradle-to-run-same-app-that-uses-contentprovider-on-one-devandroid Studio using GIF tutorial Android Studio Tips of the Day-roundup #1 http://www.developerphil.com/ ANDROID-STUDIO-TIPS-OF-THE-DAY-ROUNDUP-1/Android Studio Simulation system end app for memory recovery method: in device| The end operation in the Logcat.


From Wiznote

Android Studio development Environment issue record

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.