在成功地将Eclipse-Android-Project导入到“Android Studio 1.4”后,我得到了错误

"Please select Android SDK"

当我点击按钮在模拟器中运行应用程序时,我找不到任何方法来这样做。

当我点击“run”时,这个对话框就会打开:

这是“项目结构”对话框:

我现在该怎么办?


当前回答

如果你的android SDK路径是给定的,但你仍然面临这个问题,那么这可能是因为你的android工作室没有很好地同步,即使你点击了“立即同步”链接。

为了重新同步,去到app gradle文件,做些改变,或者给一个空间,然后再同步。它会完美工作的。

其他回答

有时android工作室只是愚蠢的行为,需要某种重置..

进入设置。Gradle文件应该包含“:app” 将其更改为包含':ap'和sync。 同步完成后,再次将其更改为包含':app'。

现在应该可以正常工作了。

只需将构建工具版本更改为25.0.3..现在开始同步 我希望它会有所帮助。

在最新的android studio 3.3.2中,Gradle文件同步项目的图标发生了变化

现在试试这个

文件->同步项目与Gradle文件(Android Studio 3.3.2)

Source Compatibility should be selected as the minimum Android Version that your app should be compatible with(usually selected as SDK 15), Target Compatibility should be selected as the newest Android Version that your app should be compatible with(SDK 23). Afterwards you want to check your AndroidMenifest and your gradle.build to see if its realy set to the properties selected if not you can just add it manually. and ofcourse you should check the SDK Location is actually pointing to your android studio SDK folder (if you are importing from Eclipse then you should point to your Eclipse SDK folder).

buildToolsVersion可能在应用程序的build.gradle中丢失

buildToolsVersion "26.0.3"

像这样加起来