Pero Pero - 7 months ago 42
Java Question

Variable needs to be declared from inner class

In android studio I have a problem:

variable 'button' is accessed from withing inner class, needs to be declared final.

How do I fix this ?


Just type final before your variable.
For example:

final button;

This should do the job.