Java 无法从 Eclipse、ADT 22.6 创建或编辑 Android 虚拟设备 (AVD)
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/22190076/
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
Cannot create or edit Android Virtual Devices (AVD) from Eclipse, ADT 22.6
提问by BarleyWarb
This problem sounds similar to a fewothers, except in my case the OK button is not grey-ed out. But for those who would rather not click the links...
这个问题听起来类似于几个人,除了在我的情况下确定按钮没有灰色-ED了。但对于那些不想点击链接的人...
Trying to create or edit an AVD from within Eclipse, after entering my settings, the "OK" button seems to be "clickable", but when I click it absolutely nothing happens.
尝试在 Eclipse 中创建或编辑 AVD,在输入我的设置后,“确定”按钮似乎是“可点击的”,但是当我点击它时绝对没有任何反应。
I've made sure I have the appropriate system images installed, and that the target platform matches the API being used. Clearly a CPU has been chosen, skin set, etc... all the things that would make the OK button greyed out, which it's not.
我已确保安装了适当的系统映像,并且目标平台与正在使用的 API 相匹配。显然已经选择了 CPU、皮肤设置等......所有会使 OK 按钮变灰的事情,但事实并非如此。
I can create/edit AVDs if I run the AVD manager from outsideeclipse, so this isn't the end of the world, but I feel there's a solution to this particular problem and I want to help solve it.
如果我从Eclipse外部运行 AVD 管理器,我可以创建/编辑 AVD ,所以这不是世界末日,但我觉得这个特定问题有解决方案,我想帮助解决它。
I've tried running eclipse as an administrator (that's what stopped the AVD manager from crashing outside of eclipse). I've tried just waiting around, or clicking multiple times. Looking at the Task Manager, no new processes begin when I click OK, nor does eclipse's CPU or RAM usage increase at all. The "Edit Android Virtual Device" window doesn't even go away.
我试过以管理员身份运行 eclipse(这就是阻止 AVD 管理器在 eclipse 之外崩溃的原因)。我试过只是等待,或多次点击。查看任务管理器,当我单击“确定”时,没有新进程开始,eclipse 的 CPU 或 RAM 使用量也根本没有增加。“编辑 Android 虚拟设备”窗口甚至不会消失。
Any clues?
有什么线索吗?
(Running Indigo with the ADT plugin, btw, not the bundled version, which failed to work in a different way. Java 1.6.0 45. Windows 8, unfortunately. Plenty of RAM etc)
(使用 ADT 插件运行 Indigo,顺便说一句,不是捆绑版本,它无法以不同的方式工作。Java 1.6.0 45。不幸的是,Windows 8。大量的 RAM 等)
回答by Yash Krishnan
THIS IS A POSSIBLE WORKAROUND FOR BUGS IN ADT 22.6.0 ONLY, THESE BUGS SUBSEQUENTLY FIXED IN FOLLOWING BUILDS
这仅是 ADT 22.6.0 中错误的可能解决方法,这些错误随后在以下版本中修复
Download and install new ADT v22.6.1 from here (zip)or use SDK manager to update
从这里下载并安装新的 ADT v22.6.1 (zip)或使用 SDK 管理器进行更新
Seems like some bug from Google side, this problem found after "ADT 22.6"update. Widely reported on "Android Open Source Project - Issue Tracker"and nobody properly answered it yet.
似乎是谷歌方面的一些错误,这个问题是在“ADT 22.6”更新后发现的。广泛报道“Android 开源项目 - 问题跟踪器”,但尚未有人正确回答。
However I was partially successful to create an AVD by opening "AVD manager.exe"from "Android SDK"for creating new AVD try to open directly AVD Manager.exe in SDK folder.
但是,我通过从“Android SDK”打开“AVD manager.exe ”来创建新的 AVD来创建 AVD 部分成功,尝试直接打开 SDK 文件夹中的 AVD Manager.exe。
May be we have to wait for any conformation from Android community
可能我们必须等待Android 社区的任何确认
Worked for me, sort of.. .
为我工作,有点......
(Windows 8.1 Pro 64 Bit, Java JDK 1.7 Update 25, Eclipse Standard Kepler Service Release 1, Android Development Toolkit 22.6.0.v201403010043-1049357)
(Windows 8.1 Pro 64 位、Java JDK 1.7 Update 25、Eclipse Standard Kepler Service Release 1、Android 开发工具包 22.6.0.v201403010043-1049357)
Update 1
更新 1
Further research revealed that launching AVD Managerfrom SDK Manager (Tools --> Manage AVDs...)also works without any problems.
进一步的研究表明,从SDK 管理器(工具 --> 管理AVD ...)启动AVD 管理器也没有任何问题。
Update 2
更新 2
More bad news is AVD creation not working from command line tooltoo.
更坏的消息是 AVD 创建也不适用于命令行工具。
Update 3
更新 3
Assuming some parameter passed during launching AVD managerfrom Eclipsecauses these problems
假设在从Eclipse启动AVD 管理器期间传递的某些参数会导致这些问题
Update 4
更新 4
Updated Javato JDK 1.7 Update 51and Eclipse Standard SDKto Kepler Service Release 2their latest and no resolution to the problems. Also tested under Debianand same results obtained.
将Java更新为JDK 1.7 Update 51,将Eclipse 标准 SDK更新为Kepler Service Release 2,它们是最新的,但没有解决问题。也在Debian下进行了测试并获得了相同的结果。
Update 5
更新 5
At https://code.google.com/p/android/issues/detail?id=66661android project members conforms the problems and promises to fix by upcoming versions of ADT (22.6.1 - 22.6.3). At the mean time I would suggest to roll-back ADTto a lower version version 22.3.0
在https://code.google.com/p/android/issues/detail?id=66661android 项目成员符合问题并承诺通过即将推出的 ADT 版本(22.6.1 - 22.6.3)修复。同时,我建议将ADT回滚到较低版本 22.3.0
To uninstall current ADT go to
要卸载当前的 ADT,请转到
Help --> About Eclipse --> Installation Details --> Android Development Tools --> Uninstall
帮助 --> 关于 Eclipse --> 安装详情 --> Android 开发工具 --> 卸载
I may suggest uninstalling whole packages from Android (DDMS, Hierarchy Viewer, NDT, Traceview, OpenGL ES..etc..)to avoid any possible compatibility issues and install a fresh new ADT from above link through archive installation method.
我可能会建议从 Android (DDMS、Hierarchy Viewer、NDT、Traceview、OpenGL ES.. 等)卸载整个软件包,以避免任何可能的兼容性问题,并通过存档安装方法从上面的链接安装全新的 ADT 。
Hope this will solve this problem temporarily. And wait for new release of ADT here.
希望这能暂时解决这个问题。并在这里等待 ADT 的新版本。
Update 6
更新 6
New ADT, version 22.6.1is out now which will solve these problems
新的ADT,版本22.6.1超出现在这将解决这些问题
回答by mayooran
Give some value for your sd card. May be something like 100 or 200
为您的 SD 卡提供一些价值。可能是 100 或 200
回答by MidnightJava
For those posting that we need to set the sdcard size: I tried that and many other settings, and none of that helps. I get the NoClassDefFound Exception mentioned by mogilka, in the Error view. No configuration settings are going to fix that. It seems a bad update was pushed
对于那些我们需要设置 SD 卡大小的帖子:我尝试了该设置和许多其他设置,但这些都没有帮助。我在错误视图中收到了 mogilka 提到的 NoClassDefFound 异常。没有配置设置可以解决这个问题。似乎推送了错误的更新
回答by MidnightJava
To elaborate on the statement "I can create/edit AVDs if I run the AVD manager from outside eclipse" in the OP:
要详细说明 OP 中的语句“如果我从 Eclipse 外部运行 AVD 管理器,我可以创建/编辑 AVD”:
Run the following on the command line
在命令行上运行以下命令
<android-sdk-location>/tools/android avd (on Linux in this case)
This launches the same AVD window you see when you click the AVD Manager icon in the eclipse toolbar. But this instance of the AVD manager does not have the bug, and you can create and run emulators as you did before the bug was introduced.
这将启动您在 eclipse 工具栏中单击 AVD Manager 图标时看到的相同 AVD 窗口。但是这个 AVD 管理器的实例没有这个 bug,你可以像在引入 bug 之前一样创建和运行模拟器。
回答by INSITE MOBILE
INFO:
信息:
I WAS able to create an AVD successfully after clicking OK several times and modifying some of my settings as a test.
多次单击“确定”并修改我的一些设置作为测试后,我能够成功创建 AVD。
I tried yashwanth krishnan solution and tried to open the AVD Manageer.exe directly without success. The manager will not open directly for me on Windows 8 x64. It tries to open, then shuts down immediately...
我尝试了 yashwanth krishnan 解决方案并尝试直接打开 AVD Manager.exe 没有成功。管理器不会在 Windows 8 x64 上直接为我打开。它试图打开,然后立即关闭......
回答by user1461926
I met this issue too . The issue occurs in the latest version 22.6 which was released in March . Meanwhile I did the testing in 22.3 , the issue was not found .
我也遇到了这个问题。该问题出现在 3 月发布的最新版本 22.6 中。同时我在22.3做了测试,没有发现问题。
So that I suggest that rollback the ADT to 22.3 and wait the new fix for 22.6
所以我建议将 ADT 回滚到 22.3 并等待 22.6 的新修复
回答by Joe Plante
I banged my head on this for several hours until I found out that the default location was C:\username path\SDKs or something, where Android was installed on my system to D:\sdks\android_sdk_windows. So, changing the Eclipse Android directory to D:\sdks\android_sdk_windows fixed it.
我在这个问题上敲了几个小时,直到我发现默认位置是 C:\username path\SDKs 或其他东西,其中 Android 安装在我的系统上到 D:\sdks\android_sdk_windows。因此,将 Eclipse Android 目录更改为 D:\sdks\android_sdk_windows 修复了它。
I also heard that it may help things if you install the Android SDK to a path without spaces.
我还听说如果将 Android SDK 安装到没有空格的路径可能会有所帮助。
Hope this helps someone keep some hair.
希望这可以帮助某人保留一些头发。
回答by Mohamed El-Nakib
Update and Solution:AsYashwanth Krishnan said, The bug in question is now fixed in later versions. I tried ADT 222.6.1 and ADT 22.6.2 , and they did not suffer from the bug of not not being able to create or edit Android Virtual Devices. The direct solution is to update you ADT to latest version, The workaround written below is left only for historical purposes.
更新和解决方案:AsYashwanth Krishnan 说,有问题的错误现已在以后的版本中修复。我尝试了 ADT 222.6.1 和 ADT 22.6.2 ,它们没有遭受无法创建或编辑 Android 虚拟设备的错误。直接的解决方案是将您的 ADT 更新到最新版本,下面写的解决方法仅用于历史目的。
Historical WorkaroundAs @Yashwanth Krishnan said, this is a bug in ADT plugin 22.6; so best workaround is to rollback. for those asking how to rollback, here is a step-by-step guide:
历史解决方法正如@Yashwanth Krishnan 所说,这是 ADT 插件 22.6 中的一个错误;所以最好的解决方法是回滚。对于那些询问如何回滚的人,这里是一个分步指南:
First: Uninstall ADT plugin and all related plugins for android:
help->about
Installation details
Select android plugins and press uninstall button
Restart
第一:卸载 ADT 插件和所有相关的 android 插件:帮助->关于
安装细节
选择 android 插件并按卸载按钮
重新启动
Second: Download ADT 22.3.0 Archive from https://dl.google.com/android/ADT-22.3.0.zip
第二:从https://dl.google.com/android/ADT-22.3.0.zip下载 ADT 22.3.0 Archive
and install it
add repository from archive on local disk
Select android plugins
并安装它
从本地磁盘上的存档添加存储库
选择android插件
回答by Growling Flea
Today I ran into the same problem after installing Maven. I messed around with different Path settings to get it to work and I ran into issues. I was also trying to install the google server for GCM. Somewhere in what I was doing I corrupted the Android Virtual Device Manager. I searched S.O. for an answer, then I decided to follow the first rule of TechSupport. I reinstalled the tool kit!
今天我在安装 Maven 后遇到了同样的问题。我弄乱了不同的路径设置以使其正常工作,但遇到了问题。我还试图为 GCM 安装谷歌服务器。在我所做的某处,我损坏了 Android 虚拟设备管理器。我搜索了一个答案,然后我决定遵循 TechSupport 的第一条规则。我重新安装了工具包!
I went into the SDK manager and I uninstalled the tools (by clicking the Tool checkbox). It took several minutes to delete them all. Then I reinstalled the Tools which took about ten minutes. I rebooted Eclipse and the AVD and worked just like it did yesterday!
我进入 SDK 管理器并卸载了工具(通过单击工具复选框)。花了几分钟才将它们全部删除。然后我重新安装了大约需要十分钟的工具。我重新启动了 Eclipse 和 AVD,就像昨天一样工作!
This time it only took a total of twenty minutes to fix.
这次一共只用了二十分钟就修好了。
回答by mike47
Per the release notes, this problem has been resolved in revision 22.6.1, which is now available for download.
根据发行说明,此问题已在修订版 22.6.1 中得到解决,现在可供下载。
Updated your Android SDK Tools to 22.6.1 in Eclipse by selecting Window
> Android SDK Manager
and follow the prompts to install the update.
通过选择Window
> 将Eclipse 中的 Android SDK 工具更新到 22.6.1,Android SDK Manager
然后按照提示安装更新。
After that update finishes, select Help
> Check for Updates
and follow the prompts to update the appropriate Eclipse components.
更新完成后,选择Help
>Check for Updates
并按照提示更新相应的 Eclipse 组件。
After completing these updates, I tested the AVD functionality and it appears to be working properly.
完成这些更新后,我测试了 AVD 功能,它似乎工作正常。