Gradle - "Changes are not tracked, unable determine incremental changes."
Asked Answered
S

11

18

When running my LibGDX desktop project I sometimes get this error:

Changes are not tracked, unable determine incremental changes.

I've tried using Java 8 and 17. I'm using Gradle 7.4.2.

I've tried the changes mentioned here but they seem to be for a Kotlin project.

I'm struggling to find any more info on what is causing this.

What else can I try to resolve this?

Sacchariferous answered 8/4, 2022 at 21:8 Comment(0)
R
43

This problem occurred for me because my project files were located within a OneDrive folder. To solve this issue; I right-clicked on my project folder in explorer and selected "Always keep on this device".

--EDIT, 8/12/2022-- Longer term I've found actually that it didn't fully work and I ended up abandoning trying to keep it on OneDrive.

Revivalism answered 4/5, 2022 at 4:59 Comment(3)
Did not solve for me. I always have to clean the project since the last Android studio updateMountain
"Always keep on this device" solved for me. Thank you very much!Cooney
Wow! I just switched to Kotlin from a project that was using some really outdated JAVA. I never would have thought one drive was causing this. Thanks good sir!Decarburize
F
12

I also received this error message after successfully building the project a few times. "Build / Clean Project" solved.

Firecrest answered 11/5, 2022 at 19:25 Comment(2)
Is it possible to add more steps on how to achieve the clean and also support it with screenshotsOutcome
I think he meant Build and Clean tasks in GradleFabrikoid
W
7

I was able to fix my error by going to File and clicking Reload all from Disk.

Whiplash answered 8/7, 2022 at 21:41 Comment(2)
As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.Guizot
File > Reload all from Disk is an action that is possible when you use IntelliJ. I have tried this but it did not work for me.Chara
P
1

I had the same problem and it would not let me just clean the gradle. I solved it by deleting my /android folder and running the build command afresh.

Prodigious answered 12/5, 2022 at 2:14 Comment(0)
E
1

It's a known bug that occurs eventually for me associated to Onedrive backup. For me set "Always keep on this device" on in OneDrive doesn't solve it.

I also noticed that this event is intermittent and probabilistic, being especially common in small and rapid source changes.

While the JetBrains team doesn't fix this problem, I simply pause the OneDrive sync in adjustments (gear icon) and few minutes later I resume it. It's a kind of trick, but it works and it's fast.

Update: Neither when I pause OneDrive works in all situations. I try everything, include invalidate caches. When I take out the folder from OneDrive it works. I will update it here if the problem returns.

Eskimo answered 2/3, 2023 at 11:31 Comment(0)
P
0

I had the same problem but the main reason that message shows up its because you have to save all your changes. Sometimes i forgot to save all changes and when rebuilding or rerunning that message appears to me too. That solves, in my case, the problem.

Presentationism answered 22/4, 2022 at 15:32 Comment(0)
C
0

I also get this issue in WSL ubuntu, it was caused by some files in sources are not readable (permissions 000), change them to 644 then build ok.

Coomer answered 9/6, 2022 at 1:39 Comment(0)
S
0

I had this issue and tried everything on this thread without success. Android Studio tells to try to build with --info to try and catch the problem, I tried and it turns out I had copied an invisible file (0 kb) to the assets and that broke the build.

My answer is not very helpful as is but it may steer the person who reads this in the right direction.

Sexlimited answered 21/9, 2022 at 15:41 Comment(2)
This does not really answer the question. If you have a different question, you can ask it by clicking Ask Question. To get notified when this question gets new answers, you can follow this question. Once you have enough reputation, you can also add a bounty to draw more attention to this question. - From ReviewReorientation
As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.Guizot
F
0

The issue on my PC was that Windows defender detected a project build file as a threat. You can either deal with the threat in the code or, if you trust that code you can ignore that threat in the antivirus software.

Frap answered 16/10, 2022 at 12:14 Comment(0)
O
0

use flutter clean then when the process end run the project again

Overkill answered 29/6, 2023 at 17:59 Comment(0)
F
0

i got the same problem after i restart my android studio because my caches are corrupted. i solved it by cleaning project.

Build -> Clean project.

Fowl answered 9/12, 2023 at 14:15 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.