简体   繁体   English

如何在不安装 Android Studio 的情况下安装 GUI android SDK 管理器

[英]How to install the GUI android SDK manager without installing Android Studio

Note that this question Is GUI for Android SDK manager gone?请注意,这个问题Is GUI for Android SDK manager 消失了吗? has been answered with a solution that was correct in the past, but no longer addresses the problem.已经用过去正确的解决方案回答了问题,但不再解决问题。

In the past, I have run IntelliJ Idea to develop Android projects, and the GUI SDK manager was available.过去我运行IntelliJ Idea开发Android项目,GUI SDK管理器可用。 Returning to Android development I now find https://developer.android.com/studio/index.html only offers a command-line stand-alone SDK manager.回到 Android 开发,我现在发现https://developer.android.com/studio/index.html只提供命令行独立 SDK 管理器。

How can I install the GUI SDK manager?如何安装 GUI SDK 管理器? I am considering installing Android Studio just to get it and then maybe uninstall Android Studio and retain the SDK manager.我正在考虑安装 Android Studio 只是为了获取它,然后可能卸载 Android Studio 并保留 SDK 管理器。 I suspect I might have the same problems with AVDs.我怀疑我可能对 AVD 有同样的问题。

Specifically with solutions offered elsewhere:特别是在其他地方提供的解决方案:

  1. There is no .../tools/android没有.../tools/android
  2. .../tools/android.bat only offers command-line options .../tools/android.bat只提供命令行选项
  3. .../tools/bin/sdkmanager.bat only offers command-line options .../tools/bin/sdkmanager.bat只提供命令行选项

#Android SDK GUI is here to stay #Android SDK GUI 就在这里

I am glad to inform the community that there is still a fully functional workaround to use the Android SDK whilst utilising the traditional GUI that most users are accustomed to.我很高兴地通知社区,仍然有一个功能齐全的解决方法来使用 Android SDK,同时利用大多数用户习惯的传统 GUI。 I am pleased to say that the GUI is here to stay (despite having been officially cut off sometime in SDK 26)我很高兴地说 GUI 将继续存在(尽管在 SDK 26 中的某个时候已被正式切断)

If you are starting from scratch I suggest you go through this post first: How do I download the Android SDK without downloading Android Studio?如果您是从头开始,我建议您先阅读这篇文章:如何在不下载 Android Studio 的情况下下载 Android SDK?

Here the most important thing is that you must first install the base packages (ie sdk tools, platform-tools, GUI sdk and AVD manager etc) found in the last installer version of SDK if you are starting form scratch, otherwise you can skip this step if you already a working sdk installation .这里最重要的是,如果你是从头开始,你必须首先安装在最后一个安装程序版本的 SDK 中找到的基础包(即 sdk 工具、平台工具、GUI sdk 和 AVD 管理器等),否则你可以跳过这个如果您已经安装了 sdk,请执行步骤

I discovered that even if you update the "SDK tools", the latest version that you can get is always 25.xx which has problem on its own as it doesn't allow you to run API levels 26, 27 or 28, as I pointed out in my post on another site: Can't start Android 8.0 Oreo on emulator: “Decryption unsuccessful”我发现即使您更新“SDK 工具”,您可以获得的最新版本始终是25.xx ,它本身存在问题,因为它不允许您运行 API 级别 26、27 或 28,因为我我在另一个网站上的帖子中指出:无法在模拟器上启动 Android 8.0 Oreo:“解密失败”

After some weeks of investigation I figured out, this was something to do the outdated emulator which is no longer provided unless you running Android Studio (which is contrary to what we want to achieve)经过几周的调查,我发现这是一个过时的模拟器,除非您运行 Android Studio,否则不再提供该模拟器(这与我们想要实现的目标相反)

From the looks of things it seems the emulator (originally distributed as part of the Android SDK Tools) is no longer updated since version 25.2.3从外观上看,模拟器(最初作为 Android SDK 工具的一部分分发)自 25.2.3 版起不再更新

Thus the workaround involves a " manual/forced upgrade " of emulator tools.因此,解决方法涉及仿真器工具的“手动/强制升级”。 Currently I successfully upgraded to version 27.3.8 (and running Android 9 smoothly).目前我成功升级到27.3.8版本(并且顺利运行Android 9)。

The workaround解决方法

To shorten the story, firstly make sure the base packages are still intact, and upgrade the emulator as follows:为了缩短故事,首先确保基础包仍然完整,并按如下方式升级模拟器:

Instructions指示

  • Download the latest (or suitable emulator) from the links supplied below从下面提供的链接下载最新的(或合适的模拟器)
  • When done, decompress the downloaded emulator.zip file and extract the emulator package to %USERPROFILE%\\Android\\android-sdk\\tools or relevant path (yes you have to merge it into that folder, since the emulator doesn't have all libraries and files)完成后,解压下载的 emulator.zip 文件并将模拟器包解压到%USERPROFILE%\\Android\\android-sdk\\tools相关路径(是的,您必须合并到该文件夹​​中,因为模拟器没有所有库和文件)
  • After this your emulator will be updated (to 27.3.8 in my case):在此之后,您的模拟器将更新(在我的情况下为 27.3.8):

在此处输入图片说明

Android SDK manager (GUI) Android SDK 管理器 (GUI)

Now prepare your AVD (API level 27 or 28);现在准备您的 AVD(API 级别 27 或 28);

  • Click on the AVD manager executable to bring the AVD setup dialog box.单击 AVD 管理器可执行文件以显示 AVD 设置对话框。
  • Choose the required parameters of the AVD and click ok to create.选择AVD需要的参数,点击ok创建。

在此处输入图片说明

Android AVD manager安卓 AVD 管理器

Run the newly created virtual devices and you should be good to go:运行新创建的虚拟设备,你应该很高兴:

  • Select the virtual device and click start;选择虚拟设备,点击开始;

在此处输入图片说明

在此处输入图片说明 在此处输入图片说明

#Be sure to update the relevant tools, images etc to get the best experience #请务必更新相关工具、图片等以获得最佳体验


Important links重要链接

Base and Emulator tools(zip)基础和模拟器工具(zip)

  1. Android SDK base installer (offline windows) Android SDK 基础安装程序(离线窗口)
  2. Linux installer (can use wget also) Linux 安装程序(也可以使用 wget)
  3. Emulator version 27.3.8 (linux latest) 模拟器版本 27.3.8 (linux 最新)
  4. Emulator version 27.3.8 (windows latest) 模拟器版本 27.3.8 (windows 最新)
  5. Emulator 27.3.8 (mac os latest) 模拟器 27.3.8 (mac os 最新)
  6. Emulator version 26.1.4 (windows) 模拟器版本 26.1.4 (windows)
  7. Emulator version 26.1.4 (linux) 模拟器版本 26.1.4 (linux)
  8. Emulator version 27.1.10 (mac os) 模拟器版本 27.1.10 (mac os)

Update: Added latest emulator versions更新:添加了最新的模拟器版本

Update 2: Newer emulator versions更新 2:较新的模拟器版本

Special thanks to androiddev for providing links for linux, eaglemt and Vladyslav Panchenko for providing the links to repos and mostly important for mac os links.特别感谢androiddev提供了 linux、 eaglemtVladyslav Panchenko的链接,他们提供了 repos 的链接,对于 mac os 链接最重要。


Conclusion结论

It seems Google intentionally decide to pull the plug on GUI for standalone Android SDK in favour of Android studio perhaps because of potential security bugs, but whatever the reason,it may not sound convincing for someone just needing the standalone package...似乎谷歌有意决定为独立的 Android SDK 拔掉 GUI 的插件,转而支持 Android Studio,这可能是因为潜在的安全漏洞,但不管是什么原因,对于只需要独立包的人来说,这听起来可能并不令人信服......

It seems like the GUI is completely gone now.现在似乎 GUI 已经完全消失了。 Atleast from SDK v26, the SDK Manager GUI is only accessible through Android Studio.至少从 SDK v26 开始,SDK Manager GUI 只能通过 Android Studio 访问。 The SDK Manager button on Visual Studio has become irresponsive. Visual Studio 上的 SDK 管理器按钮变得无响应。 Now we'll probably have to install Android Studio just to manage and update the SDKs and Emulators现在我们可能需要安装 Android Studio 来管理和更新 SDK 和模拟器

Google's another dreadful act for promoting its own IDE.谷歌推广自己的IDE的另一个可怕的行为。

UPDATE :更新 :

The official Xamarin SDK Manager is now available for Visual Studio 2017 and above.官方Xamarin SDK Manager现在可用于 Visual Studio 2017 及更高版本。 It can be installed from under "Cross Platform Mobile" workload in the Visual Studio Installer.它可以从 Visual Studio 安装程序中的“跨平台移动”工作负载下安装。 It replaces Google's standalone SDK Manager (which was deprecated in version 25.2.3 of the Android SDK Tools package).它取代了 Google 的独立 SDK 管理器(在 Android SDK 工具包的 25.2.3 版中已弃用)。 To start the SDK Manager in Visual Studio, click Tools > Android > Android SDK Manager要在 Visual Studio 中启动 SDK 管理器,请单击Tools > Android > Android SDK Manager

For VS2015 and older, we recommend downgrading SDK Tools to 25 and using the old Google Emulator manager GUI.对于 VS2015 及更早版本,我们建议将 SDK Tools 降级到 25 并使用旧的 Google Emulator 管理器 GUI。 SDK tools 25 can still be used alongside API 26, 27, and newer, and won't impact development for new platforms. SDK 工具 25 仍然可以与 API 26、27 和更新版本一起使用,并且不会影响新平台的开发。 This will give you an interface for managing your Android SDK for older versions of VS.这将为您提供一个用于管理旧版本 VS 的 Android SDK 的界面。

We provide an open source GUI interface based on sdkmanager.bat: B4A Sdk Manager我们提供基于sdkmanager.bat的开源GUI界面: B4A Sdk Manager

B4A SDK 管理器

B4A AVD 经理

It was developed mainly for B4A developers, however it can be useful for any developer who doesn't use Android Studio.它主要是为 B4A 开发人员开发的,但它对任何不使用 Android Studio 的开发人员都非常有用。

According for thisannouncement Google doesn't intend to support ADT plugin for Eclipse since June 2015, and so as GUI for ADT at all.根据此公告,自 2015 年 6 月起,Google 不打算支持 Eclipse 的 ADT 插件,因此根本不支持 ADT 的 GUI。 They explain the decision with an entire switching to Android Studio.他们通过完全切换到 Android Studio 来解释这个决定。 There are no links on official Android sources where to download last GUI version, because they find it as having potential security bugs.官方 Android 资源上没有链接可以下载最新的 GUI 版本,因为他们发现它存在潜在的安全漏洞。

So you have chance to download the last saved version, till the link will not be changed.所以你有机会下载最后保存的版本,直到链接不会改变。 But I think it always could be possible to find by tag " installer_r24.4.1-windows.exe " in Google.但我认为总是可以在谷歌中通过标签“ installer_r24.4.1-windows.exe ”找到。

Thank to Losin' Me for links:感谢Losin' Me提供链接:

Found on web.archive.orgweb.archive.org 上找到

I have just released a simple Android SDK GUI.我刚刚发布了一个简单的 Android SDK GUI。 Maybe this little weekend project could save some people from headache of using sdkmanager command line or downloading android-tools twice.也许这个周末的小项目可以让一些人免于使用 sdkmanager 命令行或两次下载 android-tools 的麻烦。

You could check my project at AndroidGUI .您可以在AndroidGUI 上查看我的项目。

Fork as you please or better yet send me PR. Fork as you please 或者更好的还是给我发 PR。 Any help would be very much appreciated.任何帮助将不胜感激。

PS: It would be very useful if somebody could point me to the latest sdklib-*.jar source code. PS:如果有人能指出我最新的 sdklib-*.jar 源代码,那将非常有用。 So that I could interface with Android SDK directly.这样我就可以直接与 Android SDK 交互。

Well because the standalone manager is outdated and in linux commands like "android sdk" and "android adv" stop working I learned to run devices from command line tools:好吧,因为独立管理器已经过时,并且在诸如“android sdk”和“android adv”之类的 linux 命令中,我学会了从命令行工具运行设备:

Link to my response in other topic.链接到我在其他主题中的回复。 (only for linux) https://stackoverflow.com/a/57019574/7600634 (仅适用于 linux) https://stackoverflow.com/a/57019574/7600634

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM