Installing Android SDK Command-line tools from Android SDK Manager did the job for me.
- Open Tools > SDK Manager
- From the left choose, Appearance & Behavior > System Settings > Android SDK
- Select SDK Tools from the top menu
- Check Android SDK Command-line tools and click 'apply'.
Alternative to step #1: WINDOWS: File > Settings (Ctrl+Alt+S) / MAC : Android Studio > Preferences
This fix works for Windows, Linux and Mac OS X.
If you are facing a problem in spite of the above steps, you can try upgrading your system to JDK 8. Official documentation of upgrading to JDK 8 is available here.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…