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

查看:29
本文介绍了我如何“选择 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 -> 将项目与 Gradle 文件同步 (Android Studio 3.1.1)

工具 -> Android -> 将项目与 Gradle 文件同步 (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天全站免登陆