android sdk 和 avd 管理器无法在 Windows 7 x64 上启动

发布于 2024-08-20 02:53:09 字数 85 浏览 13 评论 0原文

谁能确认 Windows 7 x64 上是否尚不支持 Android 开发? 我下载了 sdk,但是当我尝试启动 sdk 和 avd 管理器时,它无法启动。

Can anyone please confirm if android development is not yet supported on windows 7 x64?
I downloaded the sdk, but when I tried to launch the sdk and avd manager it fails to launch.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(9

对我有用的是添加指向 jdk 文件夹的 JAVA_HOME 环境变量(在我的例子中 c:\Program Files\Java\jdk1.7.0_04)并添加 %JAVA_HOME%\bin< /code> 到 PATH 变量

What worked for me was adding the JAVA_HOME environment variable pointing to the jdk folder (in my case c:\Program Files\Java\jdk1.7.0_04) and adding %JAVA_HOME%\bin to PATH variable

沫离伤花 2024-08-27 02:53:09

这个问题可能已经死了,但我想我已经弄清楚了。

确保您已将 c:\android_sdk_windows\tools 目录添加到 %PATH% 环境变量中。

在 Eclipse 中检查 Windows->Preferences->Android 并确保您已将 SDK 位置设置为上面的 SDK 目录。

在 SDK 目录下手动创建 2 个目录

platforms

add-ons

SDK 和 AVD 管理器现在应该可以启动。

This question is probably dead but I think I've figured it out.

Ensure you've added the c:\android_sdk_windows\tools dir to your %PATH% environmental variable.

In eclipse check Windows->Preferences->Android and ensure you've set the SDK location to the SDK directory above.

Manually create 2 directories under the SDK directory

platforms

add-ons

The SDK and AVD manager should now be launchable.

携君以终年 2024-08-27 02:53:09

对我来说,通过编辑 android_sdk/tools/lib 文件夹中的 find_java.bat 在 windows 8 64 上解决了问题。

基本上,设置 java_exe 和 javaw_exe 的 for 循环将无法正常工作,如果
路径中有一个空白! IE。 “C:\Program Files\Java\jdk”有这个,find_java.bat
会将 java_exe 设置为 android.bat 不喜欢的“C:\Program”。

当我像这样编辑 find_java.bat 时,我没问题:
(参见'rem编辑后的两行:)

rem Check we have a valid Java.exe in the path. The return code will
rem be 0 if the command worked or 1 if the exec failed (program not found).
for /f %%a in ('%~dps0\find_java.exe -s') do set java_exe=%%a
rem edit:
set java_exe="%JAVA_HOME%\bin\java.exe"
if not defined java_exe goto :CheckFailed

:SearchJavaW
rem Check if we can find a javaw.exe at the same location than java.exe.
rem If that doesn't work, just fall back on the java.exe we just found.
for /f %%a in ('%~dps0\find_java.exe -s -w') do set javaw_exe=%%a
rem edit:
set javaw_exe="%JAVA_HOME%\bin\javaw.exe"
if not exist %javaw_exe% set javaw_exe=%java_exe%
goto :EOF

HTH

For me the problem was solved on windows 8 64 by editing the find_java.bat in the android_sdk/tools/lib folder.

Basically the for loops that set java_exe and javaw_exe will not work correctly if
the path has a white space in it! Ie. "C:\Program Files\Java\jdk" has this, find_java.bat
will set java_exe to "C:\Program" which android.bat doesn't like.

I was ok when i edited find_java.bat like this:
(see the two lines after 'rem edit:)

rem Check we have a valid Java.exe in the path. The return code will
rem be 0 if the command worked or 1 if the exec failed (program not found).
for /f %%a in ('%~dps0\find_java.exe -s') do set java_exe=%%a
rem edit:
set java_exe="%JAVA_HOME%\bin\java.exe"
if not defined java_exe goto :CheckFailed

:SearchJavaW
rem Check if we can find a javaw.exe at the same location than java.exe.
rem If that doesn't work, just fall back on the java.exe we just found.
for /f %%a in ('%~dps0\find_java.exe -s -w') do set javaw_exe=%%a
rem edit:
set javaw_exe="%JAVA_HOME%\bin\javaw.exe"
if not exist %javaw_exe% set javaw_exe=%java_exe%
goto :EOF

HTH

笛声青案梦长安 2024-08-27 02:53:09

我遇到了同样的问题...但我没有找到任何解决方案...所以最后我开始调试 android.bat 文件。您会发现它安装在 androidSDK 文件夹和 tools 文件夹内。

我发现很有趣......
缺少两个重要的变量设置!
首先:找到下一行:java_exe=
这里缺少 java.exe 位置。如果设置示例:JAVA_HOME,则可以使用全局变量。
如果设置它,您可以覆盖该行,例如: java_exe=%JAVA_HOME%

第二:
找到下一行: for /f %%a in ('%java_exe% -jar lib\archquery.jar') do set swt_path=lib\%%a
这里缺少 lib...settings 之前的 varibale。

在上面的几行中,您可以找到一个变量设置行,例如: set work_dir="%cd%"
所以......你可以使用这个变量来帮助找到lib\archquery.jar文件

解决方案:
for /f %%a in ('%java_exe% -jar %work_dir%\lib\archquery.jar') 执行 set swt_path=lib\%%a

如果完成...只需保存修改bat文件并尝试从命令promt、exe文件或Eclipse启动Abdroid SDK管理器...

对不起大家!!!我还不明白...
所以!我在 android.bat 中进行了修改。安装 Eclipse Juno Java 和 Android SDK。
我在 eclipse 中设置了工作区目录,尝试运行 Android SDK 管理器...但它没有运行。
它引用了设置的工作区而不是安装的 AndroidSDK 文件夹...

因此,如果您使用 ...\lib\archquery.jar 文件的确切路径,则可能是最好的解决方案。

I got the same problem...but I did not find any solution on the problem...so finaly I set down and start to debug android.bat file. You find it installed androidSDK folder and inside the tools folder.

What I found was interesting...
Missing two important variables setting!
First: find the next row: java_exe=
Here missing java.exe location. You can use global variable if you set example: JAVA_HOME.
If set it you can override the row like: java_exe=%JAVA_HOME%

Second:
Find the next row: for /f %%a in ('%java_exe% -jar lib\archquery.jar') do set swt_path=lib\%%a
Here missing varibale before lib...settings.

A few lines above you can find a variable setting row like: set work_dir="%cd%"
So...you can use this variable to help to find lib\archquery.jar file

Solution:
for /f %%a in ('%java_exe% -jar %work_dir%\lib\archquery.jar') do set swt_path=lib\%%a

If you finished...just save the modified bat file and try to start Abdroid SDK manager from command promt, exe file or Eclipse...

SORRY GUYS!!! I don't understand yet...
So! I did my modification in android.bat. Install Eclipse Juno Java and Android SDK.
I set a workspace directory in eclipse, try to run Android SDK manager...and it is not run.
It refered the set workspace not the installed AndroidSDK folder...

So possible the best soulution if you use exact path to ...\lib\archquery.jar file.

夜空下最亮的亮点 2024-08-27 02:53:09

我也有同样的问题。我的 SDK 位于 C:\Android\android_sdk_windows 中。它已经有平台和附加文件夹。从 UI 中,我可以输入 AVD 的信息,但是当我单击 [创建 AVD] 时,它只是挂起。我可以看到它在 .ini 文件下创建了一个新的 .avd 文件夹。 .avd 文件夹中有 sdcard.img 和 userdata.img 文件。

当我最终去关闭 AVD 程序(从 Windows)时,它返回一个对话框,告诉我“Java SE 平台二进制文件没有响应”。

一个可能的问题是我同时拥有 Java 6(32 位)和 Java 7(64 位),并且 android.bat 调用的 find_java.bat 程序正在查找 64 位。它似乎仍在努力调出 UI,但速度非常慢,因此我卸载了 Java 7。现在 UI 调出得非常快(相对而言)。

不过,我已经追踪到真正的罪魁祸首是 mksdcard.exe 程序。如果我创建一个具有空 SD 值的 AVD,它会创建得很好。如果我给它一个 SD 值——HANG。

I am having this same issue. I have my SDK in C:\Android\android_sdk_windows. It already has the platform and add-ons folders. From the UI, I can enter the infor for the AVD, but when I click [Create AVD], it just hangs. I can see that it created a new folder of .avd under .ini file. And in the .avd folder are an sdcard.img and userdata.img file.

When I finally go to close the AVD program (from Windows), it comes back with a dialog telling me that the "Java SE platform binary is not responding."

One possible issue was that I had both Java 6 (32-bit) and Java 7 (64-bit) and the find_java.bat program called by android.bat was finding the 64-bit. It still seemed to be working to bring up the UI but it was very slow so I uninstalled the Java 7. Now the UI comes up very quickly (relatively speaking).

However, I've traced the real culprit to the mksdcard.exe program. If I create an AVD with an empty SD value, it creates it fine. If I give it an SD value -- HANG.

话少情深 2024-08-27 02:53:09

我认为您的 android-sdk 文件夹位于 Windows 7 系统文件夹之一,例如 Program Files (x86)。那里的权限受到系统严格控制。您最好在这些系统目录之外创建 android-sdk 文件夹。

I think you have your android-sdk folder in one of windows 7 system folders, e.g. Program Files (x86). Permissions there are tightly controlled by the system. You better create the android-sdk folder outside of those system directories.

笑忘罢 2024-08-27 02:53:09

正如评论之一指出应归咎于 C:\android-sdk-windows\tools\lib\find_java.exe 和 find_java.bat 。我有 Win7-64 位,没有安装 32 位 JavaJRE/JDK,安装了一个 jre7 64 位。 Find_java.bat+exe 工具找不到 64 位版本的正确路径。我想如果只安装了 32 位 JRE 就可以了(没有尝试这个)。

  • 打开 DOS 控制台并转到文件夹 C:\android-sdk-windows\tools\lib\
  • 运行 find_java.bat 和 find_java.exe,您应该得到“无法转换路径...”和“c:\windows\system32\java” .exe”打印输出
  • 类型命令set path=c:\Program Files\Java\jre7\bin;%path%
  • 运行find_java.bat和find_java.exe,你不会得到任何错误和正确的路径打印到 c:/program files/java/jre7/bin/java.exe

如果您不想弄乱控制面板的环境首选项,您可以创建两个批处理脚本来运行 AVD 和 SDK Manager。

C:\android-sdk-windows\AVD Manager.bat

set PATH=C:\Program Files\Java\jre7\bin;%PATH%
"AVD Manager.exe"

C:\android-sdk-windows\SDK Manager.bat

set PATH=C:\Program Files\Java\jre7\bin;%PATH%
"SDK Manager.exe"

此问题和修复已在 Win7-64bit 上测试/Android SDK 工具 20.0.3/Android SDK 平台工具 14 版本。

As one of the comments indicated its C:\android-sdk-windows\tools\lib\find_java.exe and find_java.bat to blame. I have Win7-64bit, no 32bit JavaJRE/JDK installs, one jre7 64bit install. Find_java.bat+exe tool cannot find proper path to 64bit version. I guess you're fine if only 32bit JRE was installed (did not try this).

  • Open DOS console and goto folder C:\android-sdk-windows\tools\lib\
  • run find_java.bat and find_java.exe, you should get "failed to convert path..." and "c:\windows\system32\java.exe" printouts
  • type command set path=c:\Program Files\Java\jre7\bin;%path%
  • run find_java.bat and find_java.exe, you don't get any errors and proper path to c:/program files/java/jre7/bin/java.exe is printed

If you don't want to mess with Control Panel's environment prefs you could create two batch scripts to run AVD and SDK Manager.

C:\android-sdk-windows\AVD Manager.bat

set PATH=C:\Program Files\Java\jre7\bin;%PATH%
"AVD Manager.exe"

C:\android-sdk-windows\SDK Manager.bat

set PATH=C:\Program Files\Java\jre7\bin;%PATH%
"SDK Manager.exe"

This problem and fix was tested on Win7-64bit/Android SDK Tools 20.0.3/Android SDK Platform-tools 14 releases.

九厘米的零° 2024-08-27 02:53:09

大家好,终于找到了有关 ANDROID AVD 的问题的答案。我的名字是杰里米;我不是 Stack Overflow 的用户。反正。

*仅限 WINDOWS**

第一步:删除您从 Android 下载的所有内容。当我说一切时,我指的是一切,从文件夹到其他任何东西。有时卸载不会执行此操作,因此您可能必须手动执行此操作。完成后重新启动

第二步:重新安装所有内容。我建议您使用网站上的 installer_r21-windows.exe(推荐)。

第三步:安装开发时要使用的所有软件包

第四步:设置您的 AVD 并单击“确定”。这需要一段时间,并且窗口顶部会显示“应用程序未响应”。 不要对其做任何事情;让它继续下去,它最终会启动。

希望你能顺利地得到它,这对我来说也是如此。
PS我是在Windows 7上做的。

Hey guys finally got a answer to your problem for the ANDROID AVD. My name is Jeremy; I'm not a user of Stack Overflow. Anyway.

*WINDOWS ONLY**

FIRST STEP: Delete everything you downloaded from Android. When i say everything I mean everything, from folders and anything else. Sometimes the uninstall does not do that, so you may have to manually do it. Reboot once you finish.

SECOND STEP: Re-install everything. I recommend that you use the installer_r21-windows.exe (Recommended) on the website.

THIRD STEP: Install all of your packages that you are going to use while developing.

FOURTH STEP: Set up your AVD and click OK. It will take a while, and it will say "Application not responding" at the top of the window. Do not do anything to it; let it keep going and it will eventually start up.

Hope that get it for you it did for me without the hassle.
P.S. I did it on Windows 7.

っ左 2024-08-27 02:53:09

如果您已将 Users 目录移动到名为 c:\ 的驱动器,它将无法工作 - 解决方法是从 E:\Users\Username\ 复制 .​​android 文件夹。 androidE:\Users\Username\.android - 那么它应该可以工作。

还要确保您的环境变量 Path 设置为工具文件夹的位置 - 例如 E:\android-sdk_r05-windows\android-sdk-windows\tools

If you have moved your Users directory to a drive that is not called c:\ it will not work - a workaround is to copy the .android folder from E:\Users\Username\.android to E:\Users\Username\.android - then it should work.

Also make sure your environmental variable Path is set to the location of the tools folder - e.g. E:\android-sdk_r05-windows\android-sdk-windows\tools

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文