Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android studio - Change the .gradle folder location

I'm currently testing Android O for my published Android application.

And my Gradle fails each time because it is looking for file in : "C:\Users\M?lanie.gradle\caches". As you can see my name contains a problematic character and I've already move my Android sdk because of it.

How can I move the .gradle folder too ?

I've tried to set the "GRADLE_USER_HOME" to "C:\Android\gradle" (the folder exists) but Android Studio still behaves the same way.

like image 794
Melanie Journe Avatar asked Jun 26 '17 15:06

Melanie Journe


People also ask

How to change Gradle path in Android Studio?

I've tried to set the "GRADLE_USER_HOME" to "C:\Android\gradle" (the folder exists) but Android Studio still behaves the same way. to change its path Go to this path File > Settings... > Build, Execution, Deployment > Gradle In the Global Gradle settings Change Service directory path to what you want

How can I move the Gradle folder too?

How can I move the .gradle folder too ? I've tried to set the "GRADLE_USER_HOME" to "C:\Android\gradle" (the folder exists) but Android Studio still behaves the same way. to change its path Go to this path File > Settings... > Build, Execution, Deployment > Gradle In the Global Gradle settings Change Service directory path to what you want

How do I add Gradle plugin to Android Studio?

Set the Gradle home directory to the path. Simply Go to the Android Studio plugins Path and look for a file named gradle-wrapper-x.xx.jar (x.xx = version number). Copy it to the gradle subdirectory of your project’s root folder.

How do I change the default folder location in Android Studio?

In Windows File Explorer move the .gradle folder to the new location. Move by either by dragging and dropping while holding the Shift key, or using the File Explorer context menu (normally right-click) and selecting cut, and then paste to the new location. Next access the Settings for the Android Studio.


2 Answers

Currently, to Change the .gradle folder location for Android studio, you must: Define the GRADLE_USER_HOME environment variable to point to C:\WorkFolder\.gradle.

You can read more in the Configure the IDE docs.

like image 169
Filipe Bezerra de Sousa Avatar answered Sep 21 '22 00:09

Filipe Bezerra de Sousa


To change its path go to this path File > Settings... > Build, Execution, Deployment > Gradle In the Global Gradle settings Change Service directory path to what you want.

Hope this works

like image 21
Meikiem Avatar answered Sep 19 '22 00:09

Meikiem