Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android studio executing commented lines

I am in the process of debugging an android application using android studio. I commented out certain lines and attached it to the ADB. But when debugging it still executes the commented lines! this is completely strange.

How do I fix this?

Have tried closing and reopening Android Studio, didn't help.

like image 521
Jeyachandran Rathnam Avatar asked Apr 03 '14 13:04

Jeyachandran Rathnam


1 Answers

Sometimes this happens to me when Android Studio is not running new code. I usually cannot pin it down on one specific thing (ADB, Android Studio, Build process, etc) so I go for the scorched earth approach.

Uninstall the app via ADB:

adb uninstall <package_name>

Restarting Android Studio may help, but also running a Build > Clean Project

clean


If you have changed any Gradle settings or files you may have to sync those up, so try Syncing Project with your Gradle files.

sync


If this all really doesn't work, a restart of your emulator/physical testing device and computer may be in order.

like image 82
Andrew Gable Avatar answered Oct 06 '22 01:10

Andrew Gable