I'm working "Exercise 1" of the Notepad Tutorial
and have done step #1, and am just beginning on step #2
1 Start a new Android Project by clickingFile > New > Android Project
.
2 In the New Android Project dialog
, select Create project from existing source.
So, the tutorial says to click [File], [New], [Android Project] -BUT- what I seem to have to do is click on [File], [New], [Project], [Android Project] Maybe this is a typeo in the tutorial, or am I missing something?
Anyway things seem to be OK until I follow the instructions to click on
[x] Create project from existing source And then I instantly get 2 entries into the error log that both read Unable to read C:\Andriod\Andriod-SDK-Windows\AndroidManifest.xml: java.io.FileNotFoundException: C:\Andriod\Andriod-SDK-Since I have never tried to create a project from existing code before, maybe something went wrong with the original install, and I'm just stumbling across the problem now?
If anyone really wants to read it, Full error log output follows
Thanks Joe=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Error Log Follows -=-=-=-=-=-=-=-=-=-=
~ !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 ~$~
Go to Eclipse --> Window --> Preferences and set your working location for Android SDK properly.
It does that every time for me as well but it works just fine. Just ignore those errors.
精彩评论