Tertium
Tertium

Reputation: 6308

Android Studio doesn't see static in debugger: no such static field

Strange thing, didn't find any info about this issue. In Watches window I have to replace static fields (for example, final ints) with numbers to debug, because Android Studio doesn't see them. But if I move mouse over them in code with ctrl pressed - it shows the value.

For example, myArray[IDX_SOMEINDEX] is resolving ok, while if I add it as watch expression - 'no such static field IDX_SOMEINDEX'. Even if I specify full path my.package.MyIndexesClass.IDX_SOMEINDEX Android Studio still doesn't know.

Is there a way to fix this?

Upvotes: 0

Views: 1406

Answers (1)

Discoverer98
Discoverer98

Reputation: 461

You’re probably using a minified build, that makes variable names disappear. If you turn off minifying, you should be able to see the variables.

Upvotes: 2

Related Questions