java 在 Windows 7 上运行 Android Studio 失败,找不到 Android SDK

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/16599531/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-31 23:25:55  来源:igfitidea点击:

running Android Studio on Windows 7 fails, no Android SDK found

javaandroidsdkinstallationandroid-studio

提问by Chtiwi Malek

I've downloaded and installed Android Studio, the program loads (after setting the JDK env variable) but when i click on "New Project" i get this error :

我已经下载并安装了 Android Studio,程序加载(在设置JDK env 变量之后)但是当我点击“新项目”时我收到这个错误:

Your Android SDK is out of date or is missing templates. Please ensure you are using SDK version 22 or later.

您的 Android SDK 已过期或缺少模板。请确保您使用的是 SDK 版本 22 或更高版本。

the android SDK is included with Android Studio in this location : C:\Program Files\Android\android-studio\sdkbut it seems he dosen't find it,

Android SDK 包含在此位置的 Android Studio 中:C:\Program Files\Android\android-studio\sdk但他似乎没有找到它,

android SDK or eclipse was not installed previously, anyone installed Android Studio and got/solved this error!!

之前没有安装 android SDK 或 eclipse,任何人安装了 Android Studio 并得到/解决了这个错误!!

回答by Chtiwi Malek

ok, here's how it worked:

好的,这是它的工作原理:

I downloaded the Adt bundle and Copied the file "SDK Manager.exe" to the Android studio root directory and just executed it (this set the SDK environment variable to C:\Program Files\Android\android-studio\sdk).

我下载了 Adt 包并将文件“SDK Manager.exe”复制到 Android Studio 根目录并执行它(这将 SDK 环境变量设置为C:\Program Files\Android\android-studio\sdk)。

then In Android studio clicked Configure==> Project Defaults==> Project Structure

然后在 Android studio 中点击Configure==> Project Defaults==> Project Structure

then in the tab Project/ Project SDKselected android SDK.

然后在选项卡Project/ Project SDK 中选择android SDK

then in the tab SDKs/ build targetselected Android 4.2.2

然后在选项卡SDKs/ build target 中选择 Android 4.2.2