在成功地将Eclipse-Android-Project导入到“Android Studio 1.4”后,我得到了错误
"Please select Android SDK"
当我点击按钮在模拟器中运行应用程序时,我找不到任何方法来这样做。
当我点击“run”时,这个对话框就会打开:
这是“项目结构”对话框:
我现在该怎么办?
在成功地将Eclipse-Android-Project导入到“Android Studio 1.4”后,我得到了错误
"Please select Android SDK"
当我点击按钮在模拟器中运行应用程序时,我找不到任何方法来这样做。
当我点击“run”时,这个对话框就会打开:
这是“项目结构”对话框:
我现在该怎么办?
当前回答
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).
其他回答
只需将构建工具版本更改为25.0.3..现在开始同步 我希望它会有所帮助。
有很多答案,我尝试使用其中一个解决方案,在构建中添加新的行。Gradle文件,但它没有工作。然后我将comileSdkVersion更改为另一个版本,然后将其更改为我拥有的版本。“同步”按钮出现。按下它,为我解决了问题。
在我的情况下,没有选择java sdk版本的项目结构-
我必须选择-
1.源兼容性(1.7)
2.目标兼容性(1.7)
如图所示。
按“Ctrl+shift+A”并在弹出的EditText中写入“Sync Project with Gradle Files”。然后双击出现的选项。然后它将同步您的Gradle文件SDK与项目文件。
点击这个图标来同步gradle
或者编辑你的gradle模块,然后同步