今天是最无奈的一天了.Android报错.重启一次程序报一次错.老是找不到AVD,我晕,尽管我机器上类似于我的文档等路径都是改过的,但在程序设置中全都改过来了,这该死的刚运行了一两次就开始耍性子了.想害死我,无奈,继续探索中...在系统属性--环境变量中增加了一个固定的参数"ANDROID_SDK_HOME",将路径也给固定了,可是还亦然如故,好,继续修改,改回原来路径,删掉全部设置后,直接弹错.错误日志如下:

"Unhandled event loop exception"
java.lang.NullPointerException at com.android.sdklib.internal.avd.AvdManager.parseAvdInfo(AvdManager.java:1103) at com.android.sdklib.internal.avd.AvdManager.buildAvdList(AvdManager.java:1084) at com.android.sdklib.internal.avd.AvdManager.(AvdManager.java:365) at com.android.sdkuilib.internal.repository.UpdaterData.initSdk(UpdaterData.java:180) at com.android.sdkuilib.internal.repository.UpdaterData.(UpdaterData.java:79) at com.android.sdkuilib.internal.repository.UpdaterWindowImpl.(UpdaterWindowImpl.java:83) at com.android.sdkuilib.repository.UpdaterWindow.(UpdaterWindow.java:54) at com.android.ide.eclipse.adt.internal.wizards.actions.AvdManagerAction.run(Unknown Source) at org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:251) at org.eclipse.ui.internal.WWinPluginAction.runWithEvent(WWinPluginAction.java:229) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584) at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501) at org.eclipse.jface.action.ActionContributionItem$6.handleEvent(ActionContributionItem.java:452) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1003) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3880) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3473) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2405) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2369) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2221) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514) at org.eclipse.equinox.launcher.Main.run(Main.java:1311)

超级无语中,最后删掉所有的东西,删除环境变量中的配置,继续新建AVD,注销后,终于可以了.自己都郁闷了.不知道下次又会包什么错,总算弄好了,下班时间也早过了,算了.待晚点再走.
基本上平时出现无法找到AVD:

错误如下:ERROR: unknown virtual device name: ‘AVD’

此时一般都是改变环境路径,或者参数错误引起的,解决:

1、将其他目录下的.android复制到C:Documents and SettingsAdministrator路径下.(具体的用户名看自己的)然后进入.androidavd打开avd.ini文件.将里面的路径设成此路径,
2、就是之前说的,修改环境变量的,右键我的电脑-属性--高级--环境变量在下面的系统变量中增加一个ANDROID_SDK_HOME项,值设为你的,android路径.