In any code, i guess, there are variables/method/classes that are really not used and maybe just there for show/just in case.
Anyway, How do i set Android Studio to stop giving me the 'yellow' error stripe marks in the scrollbar for unused variables. Although, i don't want to stop getting warnings all together.
Fount it!
Right click the scroll bar > Customize Highlight Level
> Configure inspections
. You'll find an immense list, type-in the search field for unused
then you'll see "Unused Symbol", unchecked it.
add SuppressWarnings
annotation at the methods/variables/classes which are unused...
@SuppressWarnings("unused")
private String unusedString;
@SuppressWarnings("unused")
private void unusedMethod() {
}
@SuppressWarnings("unused")
private class UnUsedClass {
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With