Mikhail
Mikhail

Reputation: 3305

Range bug after upgrading Android Studio - Value must be ≤ 1.0 (was 100) less

After Android Studio upgrade to version 3.0 I get the following warning: "Value must be ≤ 1.0 (was 100) less."

enter image description here

But the project is normally compiled. What's wrong with the number 100?

I drew attention to this because the Android Studio marks this as an error, not an ordinary warning.

enter image description here

Upvotes: 0

Views: 3605

Answers (2)

Tor Norbye
Tor Norbye

Reputation: 9150

This is a bug in lint (https://issuetracker.google.com/69366129). It has been fixed for 3.1 Canary 5.

Upvotes: 1

CommonsWare
CommonsWare

Reputation: 1006944

Odd — for some reason, I'm not seeing android.support.v4.graphics.ColorUtils in the JavaDocs. Regardless, based on source code, the return value has @FloatRange(from = 0.0, to = 1.0), which is where the Lint error is getting its data from.

In terms of why you are seeing an error, that feels like a Lint bug. You might consider filing an issue with a reproducible test case.

In terms of why you are seeing an error now, each new version of Android Studio has new Lint rules, some of which may have bugs.

Upvotes: 0

Related Questions