Android build error. Problem with gradle.settings

gradle
android
#1

Hi!
Today I have a some problems with builds. I did not update gradle version since last successful build but today my build failed with exception and I have no idea how to fix it. Could you help me with this?
org.gradle.api.GradleException: Could not load compiled classes for settings file '/bitrise/src/settings.gradle' from cache.

Two different build with fails on different steps


2 Likes

#2

Hello Max, we are having a similar issue since yesterday and are working on finding out what’s up.
Our issue is in a single separate feature branch. Have you been able to solve it ?

Thanks :sunny:

0 Likes

#3

No, I still have this problem

1 Like

#4

We’re also getting this error all of a sudden

0 Likes

#5

This is quite strange, if we open a branch which root is the defective branch, change no relevant code and compile from there: it works fine. As a last resort we will discard the defective branch and use the new one but it is not the most elegant outcome.

0 Likes

#6

@rovkinmax @mnogas We managed to solve the problem in quite a interesting way:

On your defective branch:

  1. Modify gradle-wrapper.properties and build.gradle (project) to downgrade to a previous version of gradle. In our case gradle:4.0.0 and gradle-6.1.1-all.zip did the trick and commit+push

  2. Launch a regular compilation and wait for it to finish

  3. Modify both files to restore the previous versions you had and commit+push

  4. Launch a regular compilation and wait for it to finish, it shall work now.

As we understand it, something was messed in bitrise+gradle binary caches and it was not possible to “reboot” it. This forced it to do so. I hope this will be helpful.

Take care !

0 Likes

#7

Thank you for reaching out!

Have you tried deleting your cache and rebuilding again?

You can find these settings in your app settings:

Thi

0 Likes

#8

@thi.nguyen Thanks so much for the tip, we didn’t even think about trying to find such option. We won’t forget it anymore :slight_smile:
Do you think deleting those cachés would have solved the problem the same way our solution did ?

0 Likes

#9

Had the the same problem in 3 of our projects.

We cleared the cache as mentioned by @thi.nguyen and it solved the issue for us.

0 Likes

#10

Thanks, clear cache solved problem

0 Likes

closed #11

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.

0 Likes