java Android Studio 设置 JDK 错误
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/35578036/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Android Studio setup JDK error
提问by Jaiprakash Soni
In Android Studio I am facing bellow error
This popup shows when I press Alt+Enter
for missing classes(symbols). When I click on setup SDK it shows two options
当我按下Alt+Enter
缺少的类(符号)时,会显示此弹出窗口。当我点击 setup SDK 时,它会显示两个选项
- 1.8(Java version "1.8.0_60")
- Android API 23 Platform (Java version "1.8.0_60")
- 1.8(Java 版本“1.8.0_60”)
- Android API 23 平台(Java 版本“1.8.0_60”)
Nothing happens on selecting any of above options.
选择上述任何选项时没有任何反应。
NOTE:My Java_Home path is correct and in android studio I have checked JDK path it's correct.
注意:我的 Java_Home 路径是正确的,在 android studio 中我检查了 JDK 路径是正确的。
I am using Android Studio 1.5.0, Java 1.8 and windows 10
我使用的是 Android Studio 1.5.0、Java 1.8 和 Windows 10
回答by Jaiprakash Soni
Simple Invalidate Cache and Restart
doesn't work for me. So I have done following steps:
简单Invalidate Cache and Restart
对我不起作用。所以我做了以下步骤:
- Check and verify Java path in Java_home variable
- Start Android Studio and invalidate cache
File--> Invalidate Cache and Restart
- 检查并验证 Java_home 变量中的 Java 路径
- 启动 Android Studio 并使缓存失效
File--> Invalidate Cache and Restart
回答by Attaullah Attari
Start Android Studio and click File -> Invalidate Cache and Restart.This has worked for me. Thanks
启动 Android Studio 并点击File -> Invalidate Cache and Restart。这对我有用。谢谢
回答by Hanisha
Close Android studio then again open it . Go to File--> Invalidate Cache and Restart . You are done.
关闭 Android studio 然后再次打开它。转到 File--> Invalidate Cache and Restart 。你完成了。