未找到 Android SDK - Android Studio
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/21633035/
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
No Android SDK found - Android Studio
提问by Javatar
I have a problem with Android 0.4.2 Studio, when creating a new application, it tells me there is a problem with the rendering and shows me the following problem:
我在使用 Android 0.4.2 Studio 时遇到问题,在创建新应用程序时,它告诉我渲染存在问题,并向我显示以下问题:
Renderering Problems No Android SDK found. Please configure an Android SDK.
渲染问题 未找到 Android SDK。请配置一个Android SDK。
My setup SDK and JDK is this: Android SDK location: C:\adt-bundle-windows\sdk, I put the path I use in Eclipse SDK, or there may be the problem, if someone has happened and what has been fixed, I'd like to give me the solution, thank you very much.
我的设置SDK和JDK是这样的:Android SDK位置:C:\adt-bundle-windows\sdk,我把我在Eclipse SDK中使用的路径,或者可能有问题,如果有人发生过并且已经修复,我想给我解决方案,非常感谢。
回答by Shawn
I just encountered and solve a similar problem.
我刚刚遇到并解决了类似的问题。
First you should check the directory like other threads described. Then you can check whether the Build tool versionmatches your SDK version.
首先,您应该像描述的其他线程一样检查目录。然后您可以检查构建工具版本是否与您的 SDK 版本匹配。
(e.g. for my project, in build.gradle file, you have:)
(例如,对于我的项目,在 build.gradle 文件中,您有:)
android { compileSdkVersion 21 buildToolsVersion "21.1.1" }
android { compileSdkVersion 21 buildToolsVersion "21.1.1" }
and then open you SDK manager, make sure you have the same version of sdk(21.1.1) installed in the selected directoriy:
然后打开您的 SDK 管理器,确保您在所选目录中安装了相同版本的 sdk(21.1.1):
If not, install it and restart Android Studio. It works for me.
如果没有,请安装它并重新启动 Android Studio。这个对我有用。
I've also seen other guys saying run Android Studio as administrator would also help:
我还看到其他人说以管理员身份运行 Android Studio 也会有所帮助:
回答by WM1
I got the same "No Android SDK Found" error message... plus no rendering for Design window, no little cellphone screen.
我收到了相同的“未找到 Android SDK”错误消息......加上设计窗口没有渲染,没有小手机屏幕。
My SDK path was correct, pointing to where the (downloaded during setup) SDK lives.
我的 SDK 路径是正确的,指向(在安装过程中下载的)SDK 所在的位置。
During Setup of the SDK Mgr, I didn't download the latest "preview edition (version 20)"...(I thought it better to use the next most recent version (19)) Later I found, there was no dropdown choice in the AVD Manager to pick Version 19, only the default value of the preview, 20.
在安装SDK Mgr时,我没有下载最新的“预览版(20版)”...(我觉得最好用下一个最新的版本(19)) 后来我发现,没有下拉选项在 AVD Manager 中选择 Version 19,只有预览的默认值,20。
I thought "Maybe the rendering was based on a version that wasn't present yet." So, I downloaded all the "preview edition's (version 20)" SDK Platform (2) and system images (4)...
我想“也许渲染是基于一个尚不存在的版本。” 因此,我下载了所有“预览版(版本 20)”SDK 平台(2)和系统映像(4)...
Once download/install completed, RESTARTED Android Studio and Viola! success... error message gone, rendering ok.
下载/安装完成后,重新启动 Android Studio 和 Viola!成功...错误消息消失,渲染正常。
回答by protus peter
i have just discovered, android studio 3.0.1 has no sdk during the installation. because during the installation, it doesn't give sdk as part of install able unlike in recent versions of android studio.
我刚刚发现,android studio 3.0.1 在安装过程中没有 sdk。因为在安装过程中,与最新版本的 android studio 不同,它不会将 sdk 作为安装的一部分。
回答by Scott Barta
From the Filemenu, choose Project Structure(if you're running 0.4.4 there's a bug and the menu item doesn't have a title, but it still works), and choose the Android SDKitem. You should see something like this where you can set up your JDK and SDK.
从“文件”菜单中,选择“项目结构”(如果您运行的是 0.4.4,则存在一个错误且菜单项没有标题,但它仍然有效),然后选择Android SDK项。您应该会看到类似这样的内容,您可以在其中设置 JDK 和 SDK。
After setting it, quit Android Studio and relaunch it for good measure.
设置后,退出 Android Studio 并重新启动它以进行良好的测量。
回答by venky
Don't worry just change the
别担心,只需改变
build.gradle
ext.kotlin_version = '1.2.41'
to previous version. It worked for me hope it works for you too. Happy coding.
到以前的版本。它对我有用,希望它对你也有用。快乐编码。
回答by M.Noman
Do following steps
执行以下步骤
a) Change minSdkVersion and sync gradle
a) 更改 minSdkVersion 并同步 gradle
b) Revert back your minSdkVersion and sync gradle again
b) 恢复您的 minSdkVersion 并再次同步 gradle
It will be resolved.
它会得到解决。
回答by MiStr
According to the Android Studio download page, the SDK comes bundled with Android Studio. It has its own copy when you install Android Studio.
根据Android Studio 下载页面,SDK 与 Android Studio 捆绑在一起。当您安装 Android Studio 时,它有自己的副本。
ADT is a plugin for Eclipse. Try reading through that webpage to see if there is something that got missed when installing.
ADT 是 Eclipse 的插件。尝试通读该网页以查看安装时是否遗漏了某些内容。
Here is the wording from the site, regarding ADT:
以下是该网站关于 ADT 的措辞:
Similar to Eclipse with the ADT Plugin, Android Studio provides integrated Android developer tools for development and debugging.
与带有 ADT 插件的 Eclipse 类似,Android Studio 为开发和调试提供了集成的 Android 开发人员工具。
回答by Husnain Aslam
Here is the solution just copy your SDK Manager.exe
file at the root folder of your android studio's installation, Sync your project and cheers... here is the link for details.
running Android Studio on Windows 7 fails, no Android SDK found
这是解决方案,只需将您的SDK Manager.exe
文件复制到您的 android studio 安装的根文件夹中,同步您的项目并欢呼......这是详细信息的链接。
在 Windows 7 上运行 Android Studio 失败,找不到 Android SDK
回答by Hajime Nohara
Try make New Project, and then choose same android version that you've installed sdk verions on "Target Android Device" dialog. In my case, error message gone.
尝试创建新项目,然后在“目标 Android 设备”对话框中选择与您已安装 sdk 版本相同的 android 版本。就我而言,错误消息消失了。
回答by Biko
I had the same problem, Android Studio just could not identify the android-sdk folder. All I did was to uninstall and reinstall android studio, and this time it actually identified the folder. Hope it also works out for you.
我遇到了同样的问题,Android Studio 无法识别 android-sdk 文件夹。我所做的只是卸载并重新安装android studio,这一次它实际上识别了文件夹。希望它也适合你。