My Android Studio suddenly stopped recognizing JDK. it starts fine with no error messages. I have JDK 1,7 (x86 version) on windows 8.1. Environment variable is defined in the system variables and I can run java -version command from cmd with no issue. following screen shot describe the problem clearly:
You may need to check if both JDK and SDK are set correctly.
In the current project :
For projects default :
Restart Android Studio and try again.
Screenshot: http://i.imgur.com/0OD8OeJ.png (I cannot post images directly)
After spending one night trying to solve this problem, i just did as suggested by yole
So Simple : File ----> Invalidate.
I had the same problem after upgrading to build tool 22.0.1. I solved this issue by removing dependencies and adding it again like app-compact and play services.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.