[英]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: 解决方案如下:
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值
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
(注意斜杠格式)
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: 请执行下列操作:
.android folder
on you harddisk. .android folder
。 .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. 这里描述了这些类型的项目创建错误(包括原因和解决方案 ) 。
It should work now. 它现在应该工作。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.