简体   繁体   English

android模拟器错误:[2011-08-02 11:14:01 - 模拟器] PANIC:无法打开:C:\\ Users \\ hallo \\ .android / avd / myemu.ini

[英]android emulator error:[2011-08-02 11:14:01 - Emulator] PANIC: Could not open: C:\Users\hallo\.android/avd/myemu.ini

I am beginner android application developer. 我是初学Android应用程序开发人员。 I have done lot of apps in eclipse on emulator and device also. 我在模拟器和设备上也在eclipse中完成了很多应用程序。 But now it is giving error at the time of running project on emulator. 但是现在它在模拟器上运行项目时出错了。 It is working on device phone but on emulator it is giving following error: 它正在设备手机上工作,但在模拟器上它出现以下错误:

[2011-08-02 11:14:00 - hello1] ------------------------------

[2011-08-02 11:14:00 - hello1] Android Launch!

[2011-08-02 11:14:00 - hello1] adb is running normally.

[2011-08-02 11:14:00 - hello1] Performing com.mahiways.Hello1.Hello1Activity activity launch

[2011-08-02 11:14:00 - hello1] Automatic Target Mode: launching new emulator with compatible AVD 'myemu'

[2011-08-02 11:14:00 - hello1] Launching a new emulator with Virtual Device 'myemu'

[2011-08-02 11:14:01 - Emulator] PANIC: Could not open: C:\Users\hallo\.android/avd/myemu.ini

How can I solve this problem? 我怎么解决这个问题?

This is a bug in the ADT Plugin. 这是ADT插件中的一个错误。 For a workaround until it is fixed use a NTFS symbolic link. 有关解决方法,直到它被修复使用NTFS符号链接。

I have a C: drive for windows 7 and a D: drive for all my work and data. 我有一个用于Windows 7的C:驱动器和用于我所有工作和数据的D:驱动器。 After installing windows 7 I relocate all my special folders from C:\\Users\\John Doe to D:\\John Doe. 安装Windows 7后,我将所有特殊文件夹从C:\\ Users \\ John Doe重定位到D:\\ John Doe。 The ADT Plugin is trying to load the emulator from C: when it and the configure files are on D: (PANIC: Could not open etc.). ADT插件尝试从C:加载模拟器时,它和配置文件在D:(PANIC:无法打开等)。 NTFS can get the ADT Plugin to read from D: using a NTFS symbolic link. NTFS可以使用NTFS符号链接从D:读取ADT插件。 Open a command prompt in C:\\Users\\John Doe (obviously use your user name), use the mklink command. 在C:\\ Users \\ John Doe中打开命令提示符(显然使用您的用户名),使用mklink命令。

mklink /J "C:\Users\John Doe\\.android" "D:\John Doe\\.android"

Now when the ADT plugin is trying to reference .android on C:, NTFS sends the request to D: and the emulator starts correctly. 现在,当ADT插件尝试在C:上引用.android时,NTFS将请求发送到D:并且模拟器正确启动。

I was having this problem also but finally found a solution. 我也有这个问题,但终于找到了解决方案。
What you need to do is: 你需要做的是:
1. Create a new Windows system variable called ANDROID_SDK_HOME and set it to the directory of your Android SDK installation 1.创建一个名为ANDROID_SDK_HOME的新Windows系统变量,并将其设置为Android SDK安装目录
2. In your "eclipse\\configuration.settings\\org.eclipse.ui.ide.prefs" file, also add a definition for ANDROID_SDK_Home 2.在“eclipse \\ configuration.settings \\ org.eclipse.ui.ide.prefs”文件中,还要添加ANDROID_SDK_Home的定义

Then, all of your AVD files will be created in your "android-sdk/.android/avd" folder 然后,您的所有AVD文件将在“android-sdk / .android / avd”文件夹中创建

Solution is as follows: 解决方案如下:

  1. Set the environment variable: ANDROID_SDK_HOME value of your SDK directory. 设置环境变量:SDK目录的ANDROID_SDK_HOME值。 As I have is: variable name ANDROID_SDK_HOME value of the E:\\java\\androidsdk 我所拥有的是: E:\\java\\androidsdk变量名ANDROID_SDK_HOME值

  2. Modify the configuration file in the eclipse installation directory. 修改eclipse安装目录中的配置文件。 Locate the following files: eclipse \\ configuration.settings \\ opened of org.eclipse.ui.ide.prefs, in a later supplement to change just to configure the environment variables. 找到以下文件:eclipse \\ configuration.settings \\ open org.eclipse.ui.ide.prefs,在稍后的补充中更改以配置环境变量。

    As I add is: ANDROID_SDK_Home = E\\:\\\\java\\\\androidsdk (Note that the slash format) 我添加的是: ANDROID_SDK_Home = E\\:\\\\java\\\\androidsdk (注意斜杠格式)

  3. Restart eclipse, reconstruction of the AVD can be run successfully. 重启eclipse,重建AVD即可成功运行。

The configuration files for your emulator might have been saved by AndroidSDK and AVD Manager some where else in your hard drive. 您的模拟器的配置文件可能已由AndroidSDK and AVD Manager保存在硬盘驱动器的其他位置。

Do the following: 请执行下列操作:

  • First search for the .android folder on you harddisk. 首先在你的硬盘上搜索.android folder
  • After you find that, move the .android folder to your user root directory - which may be "C:\\Users\\hallo\\" in your case. 找到后,将.android folder移动到用户根目录 - 在您的情况下可能是"C:\\Users\\hallo\\"

These type of project creation errors(with cause and solution ) is described here. 这里描述了这些类型的项目创建错误(包括原因和解决方案

  1. Create a environment variable called: ANDROID_SDK_HOME and set it to C:\\Users\\Administrator 创建一个名为ANDROID_SDK_HOME的环境变量,并将其设置为C:\\ Users \\ Administrator
  2. Open Eclipse > Window > Preferences and click in Run/Debug and String Substitution 打开Eclipse> Window> Preferences,然后单击Run / Debug和String Substitution
  3. Add a new variable called: user.home and set it to C:\\Users\\Administrator 添加一个名为:user.home的新变量,并将其设置为C:\\ Users \\ Administrator
  4. Create an AVD and run it. 创建一个AVD并运行它。

It should work now. 它现在应该工作。

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

相关问题 无法启动AVD模拟器:PANIC:无法打开:/home/baldur/.android/avd/AVD_for_Nexus_7_by_Google.ini - Unable to launch an AVD Emulator: PANIC: Could not open: /home/baldur/.android/avd/AVD_for_Nexus_7_by_Google.ini ubuntu上的android sdk为AVD启动模拟器PANIC:无法打开: - android sdk on ubuntu Starting emulator for AVD PANIC: Could not open: “为AVD启动模拟器”然后恐慌:无法打开...“ - “Starting emulator for AVD” then Panic: could not open…" 为AVD启动模拟器avd PANIC:无法打开:avd - Ubuntu 13.10 - Starting emulator for AVD avd PANIC: Could not open: avd - Ubuntu 13.10 模拟器:PANIC:损坏的 AVD 系统路径。 检查您的 ANDROID_SDK_ROOT 值 [C:\\Users\\Public\\Android\\Sdk] - Emulator: PANIC: Broken AVD system path. Check your ANDROID_SDK_ROOT value [C:\Users\Public\Android\Sdk] 尝试在Linux Mint上运行Android模拟器时,“PANIC:无法打开” - “PANIC: Could not open” while trying to run Android emulator on Linux Mint Android Studio模拟器PANIC错误 - Android Studio Emulator PANIC Error Android Studio - 恐慌:无法打开AVD - Android Studio - Panic: Could not open AVD Eclipse Android正在运行AVD-紧急情况:无法打开 - eclipse android running AVD - panic: could not open 启动模拟器android avd时出错 - Error launching emulator android avd
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM