android studio configuration

If gradle is not installed, you can execute gradlew in AS Terminal to automatically download the corresponding gradle version

1. Configure the gradle version number
gradle/wrapper/gradle-wrapper.properties
distributionUrl=https\://services.gradle.org/distributions/gradle -2.2.1-all.zip

2. build tools
D:\ProgramFiles\Android\android-sdk\build-tools

3.Dependencies The downloaded jar package is stored in
D:\ProgramFiles\Android\android-sdk\extras\m2repository
compile 'com.android.support:design:22.2.0' If it is not stored, gradle will prompt when building, click the link in the console to download
4.gradle home
C:\Users\Administrator.SKY-20170601ECR\.gradle\wrapper \dists\gradle-2.2.1-all\c64ydeuardnfqctvr1gm30w53\gradle-2.2.1

6. Check the directory C:\Program Files\Android\Android Studio\gradle\m2repository\com\android\tools\build\gradle\ 1.0.0
Configure classpath here 'com.android.tools.build:gradle: 1.0.0
If we configure a version that does not exist locally,
such as: 2.3.2, you can execute gradlew in the studio terminal and it will be automatically downloaded and installed

7. Assistance Generate shortcut key cyclic expand word
8. The code can be edited, but the code is displayed in red
   Solution: AS --> File --> Invalidate Caches/Restart --> Click Invalidate and Restart in the pop-up dialog box, it It will automatically clear the buffer and then restart AS

9. The gradle console reports insufficient resources.
  Open gradle.properties and modify the value of org.gradle.jvmargs, but change the value every time. Sometimes it is enough to add 1M, and then execute the run app

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326119669&siteId=291194637