Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error when compiling with Gradle (can't find downloaded dependencies)

I develop an app generation system that is regenerating apps by command line Gradle compilation commands.

In my Windows Server 2008, I'm facing a problem after updating to the last Gradle version and Gradle plugin version.

When compiling I'm getting this errors:

C:\Windows\System32\config\systemprofile\.gradle\caches\transforms-1\files-1.1\appcompat-v7-25.0.0.aar\e93435c34d5cae8b6677dcef529711a5\res\drawable-xxhdpi-v4\abc_text_select_handle_middle_mtrl_light.png: error: file not found.

C:\Windows\System32\config\systemprofile\.gradle\caches\transforms-1\files-1.1\appcompat-v7-25.0.0.aar\e93435c34d5cae8b6677dcef529711a5\res\drawable\abc_btn_colored_material.xml: error: file not found.

C:\Windows\System32\config\systemprofile\.gradle\caches\transforms-1\files-1.1\appcompat-v7-25.0.0.aar\e93435c34d5cae8b6677dcef529711a5\res\drawable-hdpi-v4\abc_textfield_search_default_mtrl_alpha.9.png: error: file not found.

and a lot more of errors like those...

I'm not sure why I'm getting this error, because the file is correctly downloaded and it's correctly located on that exactly direction.

It has a path length of 204 characters, so supposedly it's not surpassing the limit of 255 path characters on NTFS Windows file system.

It is possible to change the location where Gradle downloads it's cached dependencies? Is this problem caused by this or by other thing?

like image 661
NullPointerException Avatar asked Dec 10 '22 09:12

NullPointerException


1 Answers

finally i solved this setting the environmental variable GRADLE_USER_HOME in windows to c:/gradle-cache

so definitively it's related to file path lenght

like image 131
NullPointerException Avatar answered Apr 27 '23 17:04

NullPointerException