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

"Please select Android SDK"

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

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

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

我现在该怎么办?


当前回答

我用Android Studio 3.1.3解决了这个问题:

在Android Studio中打开有问题的项目。单击“文件>导出到Zip文件”。 关闭有问题的项目(如有必要,退出Android Studio)。 在操作系统中,删除有问题的项目文件夹。然后提取刚才制作的压缩包。 回到Android Studio。在启动界面,点击“Open an existing Android Project”。浏览到刚才提取的文件夹。

就是这样。

其他回答

在本地给出SDK路径。属性文件为

sdk.dir=C\:\\Users\\System43\\AppData\\Local\\Android\\sdk

并在gradle文件中给出compilesdk的最新版本。

简单:

制作项目

这对我很有效。

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

现在试试这个

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

您必须从项目设置中选择生成工具版本。

选择项目App文件夹 按F4或右键单击项目应用程序 文件夹和打开模块设置在属性选项卡选择构建 工具版本列表

这将在我这边工作,我希望它能帮助你。

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).