如何“选择Android SDK"?在Android Studio中? [英] How do I "select Android SDK" in Android Studio?

查看:443
本文介绍了如何“选择Android SDK"?在Android Studio中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

将Eclipse-Android-Project成功导入"Android Studio 1.4"后,出现错误

After a successful import of an Eclipse-Android-Project into "Android Studio 1.4", I get the error

请选择Android SDK"

"Please select Android SDK"

当我单击按钮以在模拟器中运行该应用程序时,但找不到任何方法.

when I click on the button to run the application in simulator, but I can't find any way of doing that.

当我单击运行"时,将打开此对话框:

This dialog opens when I click on "run":

这是项目结构"对话框:

This is the "project structure" dialog:

我现在该怎么办?

推荐答案

我转到build.gradle并单击立即同步.然后它起作用了.

I go to build.gradle and click sync now. Then it worked.

更新:

File-> Sync Project with Gradle Files (Android Studio 3.1.1)

Tools-> Android-> Sync Project with Gradle Files (Android Studio 3.0.1)

或者您可以单击工具栏上的图标.

Or You can click on the icon from the toolbar.

由于Android Studio团队致力于使该工具变得更好,因此此答案可能对更高版本没有帮助.在下一版Android Studio中,同步方式可能会有所不同.

This answer may not help works for later version as Android studio Team work on making the tool more better, the way to sync may be different in the next version of Android Studio.

常用方式可能会帮助您尝试同步项目,然后使缓存无效重新启动 Android Studio.

COMMON WAY that may helps is try to sync project and then Invalidate Caches and Restart Android Studio.

Android Studio 3.1.2的解决方案 [请参见下面的答案]

请参见最新的Android Studio版本

这篇关于如何“选择Android SDK"?在Android Studio中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆