在成功地将Eclipse-Android-Project导入到“Android Studio 1.4”后,我得到了错误
"Please select Android SDK"
当我点击按钮在模拟器中运行应用程序时,我找不到任何方法来这样做。
当我点击“run”时,这个对话框就会打开:
这是“项目结构”对话框:
我现在该怎么办?
在成功地将Eclipse-Android-Project导入到“Android Studio 1.4”后,我得到了错误
"Please select Android SDK"
当我点击按钮在模拟器中运行应用程序时,我找不到任何方法来这样做。
当我点击“run”时,这个对话框就会打开:
这是“项目结构”对话框:
我现在该怎么办?
当前回答
我也有类似的问题。我尝试与gradle文件同步并删除了。idea文件夹,但没有任何效果。
以下是对我有效的方法:
1)。关闭android工作室 2)。删除c: / / {User} /用户。AndroidStudio {version}文件夹
警告:它会删除你安装的所有插件和设置。 如果没有效果,试试这个方法
其他回答
对于那些遇到此问题的人,我建议您进行一次干净安装(删除以前安装的任何现有设置和文件)。不要浪费时间解决问题。我正在搜索android studio 3.6.3的答案,没有结果。
After opening my project in Android Studio, I opened the App version of the build.gradle file, located in the Gradle Scripts folder of the Project. When I hovered my mouse pointer over the buildToolsVersion number, a tooltip popped, indicating that the version of Android Build Tools needed to be upgraded (see screenshot). I changed the value of the buildToolsVersion to the one identified by the error (27.0.2) and the problem was solved. The original error (Please select Android SDK) went away and the project compiled successfully, again. Although this solution was mentioned previously, the exact steps seemed to be missing, so hopefully this clears up any doubt. I guess the root cause for this problem is that a new version of the build tools were released but Android Studio did not trigger any notification to me, which would have indicated that I should manually fix this (since Android Studio does not seeem to have the ability to upgrade this build.gradle file internally), which leaves the onus on the user to find the problem and fix it.
我的解决方案 这个虫子快把我逼疯了。再多的同步也无法修复它。我发现如果我修改我的模块的构建。Gradle(通过在行后添加空行或空格),然后同步该文件,一切都很好。
在我的案例中,我为一个android项目下载了一个git库。该项目需要最低sdk版本21和目标sdk版本27。当我试图运行项目时,它给了我“请选择Android SDK错误”。我检查了我已经下载了所需的sdk文件。
对我来说,解决方案是“将项目与Gradle文件同步”
您正在使用谷歌API SDK。出于某种原因,这在嵌入式java JDK / JRE中不再有效。
按照我在这里描述的解决方案,将Android Studio JDK路径设置为本地JDK(例如OpenJDK)。