Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
337 views
in Technique[技术] by (71.8m points)

android - 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:WindowsSystem32configsystemprofile.gradlecachesransforms-1files-1.1appcompat-v7-25.0.0.aare93435c34d5cae8b6677dcef529711a5
esdrawable-xxhdpi-v4abc_text_select_handle_middle_mtrl_light.png: error: file not found.

C:WindowsSystem32configsystemprofile.gradlecachesransforms-1files-1.1appcompat-v7-25.0.0.aare93435c34d5cae8b6677dcef529711a5
esdrawableabc_btn_colored_material.xml: error: file not found.

C:WindowsSystem32configsystemprofile.gradlecachesransforms-1files-1.1appcompat-v7-25.0.0.aare93435c34d5cae8b6677dcef529711a5
esdrawable-hdpi-v4abc_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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...