如何安装独立的 Android SDK,然后将其添加到 Windows 上的 IntelliJ IDEA? [英] How do I install the standalone Android SDK and then add it to IntelliJ IDEA on Windows?

查看:38
本文介绍了如何安装独立的 Android SDK,然后将其添加到 Windows 上的 IntelliJ IDEA?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是显示我从哪里下载 SDK 的网页:

在解压 .zip 文件夹并打开tools"文件夹后,我可以在 emulator.exe、mksdcard.exe 和大量 .bat 文件中看到所有内容(如下所示).

我该如何进行?

解决方案

在 IntelliJ IDEA 2017.1 和 2017.2 中,从头开始设置 Android SDK 很复杂.我建议在那里安装 Android Studio 并管理 SDK 平台.此问题将在最近的更新之一中得到解决.

如果您足够勇敢,仍然可以使用 toolsinsdkmanager.bat 命令行工具在没有 Android Studio 的情况下进行设置.SDK 管理器的 GUI 版本已弃用(SDK 下载中不再提供).可以在

您还可以访问 Android SDK 配置 UI,您可以在其中下载其他组件并执行更新(就像在 Android Studio 中一样):

This is the webpage showing from where I downloaded the SDK:

On extracting the .zip folder, and opening the 'tools' folder, all I can see in an emulator.exe, mksdcard.exe and a host of .bat files (as shown below).

How do I proceed?

解决方案

In IntelliJ IDEA 2017.1 and 2017.2 setting up Android SDK from scratch is complicated. I would recommended to install Android Studio and manage SDK platform there. This problem will be addressed in one of the nearest updates.

If you are brave enough, it's still possible to set it up without Android Studio using the toolsinsdkmanager.bat command line tool. GUI version of the SDK Manager is deprecated (no longer available in the SDK download). Standalone SDK can be downloaded here. Look below the Get just the command line tools section.

So, you will need to install at least one platform version.

First run the update to ensure you have the latest tools:

sdkmanager --update

Now you can list the packages available for installation:

sdkmanager --list

To install Android Platform:

sdkmanager platforms;android-26

To install the current build tools version (optional):

sdkmanager build-tools;26.0.0

At this point you should be able to add Android SDK configuration for the installed platform version in IntelliJ IDEA like this:

You will also have access to Android SDK configuration UI where you download additional components and perform updates (just like in Android Studio):

这篇关于如何安装独立的 Android SDK,然后将其添加到 Windows 上的 IntelliJ IDEA?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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