How to set gradle home while importing existing project in Android studio

后端 未结 29 1226
借酒劲吻你
借酒劲吻你 2020-12-02 04:49

How to set gradle home while importing existing project in Android studio. While trying to import I need to set up this path.

相关标签:
29条回答
  • 2020-12-02 04:55

    For Mac,

    /Applications/Android Studio.app/Contents/gradle/gradle-3.2
    
    0 讨论(0)
  • 2020-12-02 04:55

    On Linux Mint 17 it was

    /usr/share/gradle
    

    for me

    0 讨论(0)
  • 2020-12-02 04:55

    I had to use this

    "C:\Program Files\Android\Android Studio\gradle\gradle-4.1"

    Change the version if you have a different one.

    0 讨论(0)
  • 2020-12-02 04:55

    Don't need to download or specify anything...

    Just go to the install Android Studio plugins Path and search for any file like gradle-wrapper-x.xx.jar (x.xx = version number). Copy it to a subfolder of your project root folder named : gradle.

    Example : - file found gradle-wrapper-1.12.jar in plugins folder of Android Studio Install's path - my project was on D:\android_repo\myProject - created a folder into D:\android_repo\myProject\gradle - copy gradle-wrapper-1.12.jar to this folder D:\android_repo\myProject\gradle - import again my project and no more question about gradle.

    0 讨论(0)
  • 2020-12-02 04:55

    I've stumble across this question, trying to build an Ionic + Cordova app using Gradle from Android Studio installation, rather that installing Gradle separately.

    On Centos, the Gradle binary was here: /home/YOURUSERNAME/.gradle/wrapper/dists/gradle-VERSION-all/CUSTOM_HASH/gradle-VERSION/bin

    So, I've added export PATH=/home/maxim/.gradle/wrapper/dists/gradle-4.1-all/bzyivzo6n839fup2jbap0tjew/gradle-4.1/bin:$PATH to my ~/.bashrc and ionic cordova run android command worked just fine.

    0 讨论(0)
  • 2020-12-02 04:56

    You should be able to find it in C:\Program Files\Android\Android Studio\Gradle\Gradle 2.2.1. This is running Windows 7 64-Bit. Android Studio 1.0.2.

    0 讨论(0)
提交回复
热议问题