无法阅读... AndroidManifest.xml - 在尝试Android Notepad教程时 - 练习1

时间:2011-02-17 04:47:30

标签: android eclipse

我正在使用Notepad Tutorial

的“练习1”

并完成了第1步,我刚刚开始第2步 1单击File > New > Android Project开始新的Android项目 2在New Android Project dialog中,选择Create project from existing source.

所以,教程说点击[文件],[新],[Android项目] - 但是 - 我似乎要做的就是点击 [文件],[新], [项目] ,[Android项目] 也许这是教程中的一个类型,或者我错过了什么?

无论如何,在我按照指示点击
之前,事情似乎还可以 [x]从现有来源创建项目
然后我立即在错误日志中获得两个条目,两个条目都读取 无法读取C:\ Andriod \ Andriod-SDK-Windows \ AndroidManifest.xml:java.io.FileNotFoundException:C:\ Andriod \ Andriod-SDK-

由于我之前从未尝试过使用现有代码创建项目,原始安装可能出现问题,而我现在只是遇到了问题?

如果有人真的想要阅读它,则完整的错误日志输出如下 谢谢乔

= - = - = - = - = - = - = - = - = - = - = - = - = - = - =错误日志跟随 - = - = - = - = - = - = - = - = - = - =

~ !SESSION 2011-02-16 23:08:27.651 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.6.0_23
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Framework arguments:  -product org.eclipse.epp.package.java.product
Command-line arguments:  -os win32 -ws win32 -arch x86 -product org.eclipse.epp.package.java.product

!ENTRY com.android.ide.eclipse.adt 4 0 2011-02-16 23:09:28.468
!MESSAGE Unable to read C:\Andriod\Andriod-SDK-Windows\AndroidManifest.xml: java.io.FileNotFoundException: C:\Andriod\Andriod-SDK-Windows\AndroidManifest.xml (The system cannot find the file specified)
!STACK 0
com.android.sdklib.io.StreamException: java.io.FileNotFoundException: C:\Andriod\Andriod-SDK-Windows\AndroidManifest.xml (The system cannot find the file specified)
    at com.android.sdklib.io.FileWrapper.getContents(FileWrapper.java:92)
    at com.android.sdklib.xml.AndroidManifestParser.parse(AndroidManifestParser.java:608)
    at com.android.ide.eclipse.adt.internal.project.AndroidManifestHelper.parse(Unknown Source)
    at com.android.ide.eclipse.adt.internal.project.AndroidManifestHelper.parseForData(Unknown Source)
    at com.android.ide.eclipse.adt.internal.wizards.newproject.NewProjectCreationPage.extractNamesFromAndroidManifest(Unknown Source)
    at com.android.ide.eclipse.adt.internal.wizards.newproject.NewProjectCreationPage.access$16(Unknown Source)
    at com.android.ide.eclipse.adt.internal.wizards.newproject.NewProjectCreationPage$3.widgetSelected(Unknown Source)
    at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:228)
    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:3910)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3503)
    at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
    at org.eclipse.jface.window.Window.open(Window.java:801)
    at org.eclipse.ui.actions.NewProjectAction.run(NewProjectAction.java:117)
    at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
    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$5.handleEvent(ActionContributionItem.java:411)
    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:3910)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3503)
    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)
Caused by: java.io.FileNotFoundException: C:\Andriod\Andriod-SDK-Windows\AndroidManifest.xml (The system cannot find the file specified)
    at java.io.FileInputStream.open(Native Method)
    at java.io.FileInputStream.<init>(Unknown Source)
    at com.android.sdklib.io.FileWrapper.getContents(FileWrapper.java:90)
    ... 42 more

!ENTRY com.android.ide.eclipse.adt 4 0 2011-02-16 23:09:28.597
!MESSAGE Unable to read C:\Andriod\Andriod-SDK-Windows\AndroidManifest.xml: java.io.FileNotFoundException: C:\Andriod\Andriod-SDK-Windows\AndroidManifest.xml (The system cannot find the file specified)
!STACK 0
com.android.sdklib.io.StreamException: java.io.FileNotFoundException: C:\Andriod\Andriod-SDK-Windows\AndroidManifest.xml (The system cannot find the file specified)
    at com.android.sdklib.io.FileWrapper.getContents(FileWrapper.java:92)
    at com.android.sdklib.xml.AndroidManifestParser.parse(AndroidManifestParser.java:608)
    at com.android.ide.eclipse.adt.internal.project.AndroidManifestHelper.parse(Unknown Source)
    at com.android.ide.eclipse.adt.internal.project.AndroidManifestHelper.parseForData(Unknown Source)
    at com.android.ide.eclipse.adt.internal.wizards.newproject.NewProjectCreationPage.extractNamesFromAndroidManifest(Unknown Source)
    at com.android.ide.eclipse.adt.internal.wizards.newproject.NewProjectCreationPage.access$16(Unknown Source)
    at com.android.ide.eclipse.adt.internal.wizards.newproject.NewProjectCreationPage$3.widgetSelected(Unknown Source)
    at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:228)
    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:3910)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3503)
    at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)
    at org.eclipse.jface.window.Window.open(Window.java:801)
    at org.eclipse.ui.actions.NewProjectAction.run(NewProjectAction.java:117)
    at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
    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$5.handleEvent(ActionContributionItem.java:411)
    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:3910)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3503)
    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)
Caused by: java.io.FileNotFoundException: C:\Andriod\Andriod-SDK-Windows\AndroidManifest.xml (The system cannot find the file specified)
    at java.io.FileInputStream.open(Native Method)
    at java.io.FileInputStream.<init>(Unknown Source)
    at com.android.sdklib.io.FileWrapper.getContents(FileWrapper.java:90)
    ... 42 more ~$~

2 个答案:

答案 0 :(得分:0)

每次对我都这样做,但它运作得很好。只需忽略这些错误。

答案 1 :(得分:0)

转到 Eclipse - &gt;窗口 - &gt;首选项并正确设置Android SDK的工作位置。