'Flutter: Gradle failed when trying to built app
Gradle always get stucked for more than 10 minutes when I build
Here are the logs
+2671 ms] FAILURE: Build failed with an exception.
[ +98 ms] * What went wrong:
[ +1 ms] Gradle could not start your build.
[ +3 ms] > Could not create service of type ChecksumService using
BuildSessionScopeServices.createChecksumService().
[ +7 ms] > Cannot lock checksums cache (/home/pavan/new_project/android/.gradle/checksums) as
it has already been locked by this process.
Solution 1:[1]
On Windows 10, I deleted all .lock files located in .gradle directory AFTER having restarted my pc !
Solution 2:[2]
Keep a variable which keeps track of the last value, then compare in the Scroll event, and update the variable to the new value
Private lastValue As Integer
Private Sub TrackBar1_Scroll(sender As Object, e As EventArgs) Handles TrackBar1.Scroll
Dim change = TrackBar1.Value - lastValue
If change > 0 Then ' increasing
ElseIf change < 0 ' decreasing
Else ' stayed the same
End If
lastValue = TrackBar1.Value
End Sub
Solution 3:[3]
You could add a handler on the TrackBar.ValueChanged Event. This may be sufficient for your needs if you don't care about the previous value. The difference with the Scroll event:
Occurs when the Value property of a track bar changes, either by movement of the scroll box or by manipulation in code.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Jean-Pierre Schnyder |
| Solution 2 | djv |
| Solution 3 | Kate |


