Restart Android Studio after the changes, and restart the system as well, as sometimes it takes a system restart for Environment variables to take effect.