0

I have written this simple method in my activity in Android Studio:

Image

I did not work correctly. I tried the debugging mode to figure out the error. As it is shown, there is no variable 'b' in Variables table, Watches table and even on my mouse over.

The next surprising thing is that when I do Step Over, not only it does not come out of the method using return, but also it goes to the next return line after the last else statement.

Edit: The return issue is fixed using this link but the 'b' variable still is the problem. so it is not duplicate to that one.

I have also tried closing and reopening my Android Studio.

The version of my Android Studio is 2.1, my JRE is 1.8 and I am on Windows 10 Pro.

Please help me to fix it.

Community
  • 1
  • 1
Matin Lotfaliee
  • 1,745
  • 2
  • 21
  • 43

0 Answers0