我在 Windows 7 64 位上使用 Eclipse(Indigo)创建了一个“Hello World” Android 项目。它使用的是 Android SDK 1.6。
它可以从 IDE 中无问题构建。
现在我想要从命令行中构建它。 我发现这个问题:Opening an eclipse project through command prompt or batch file 和 Headless Building with APT in Eclipse,所以我运行了这个命令:
C:\inst\Android\eclipse>eclipsec.exe -data "C:\eclipsewsTest1" -application org.
eclipse.jdt.apt.core.aptBuild
我得到的是以下内容:
Building workspace
Building '/And1'
Invoking builder on '/And1'.
Invoking builder on '/And1'.
Invoking 'Java Builder' on '/And1'.
Cleaning output folder for And1
Build done
Invoking builder on '/And1'.
然后一个对话框会显示这个消息:
An error has occurred. See the log file C:\eclipsewsTest1\.metadata\.log
这个日志文件包含类似于以下内容:
eclipse.buildId=M20110909-1335
java.version=1.7.0_01
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Framework arguments: -product org.eclipse.epp.package.java.product -application org.eclipse.jdt.apt.core.aptBuild
Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.java.product -data C:\eclipsewsTest1 -application org.eclipse.jdt.apt.core.aptBuild
!ENTRY org.eclipse.core.resources 2 10035 2011-12-09 10:50:35.233
!MESSAGE The workspace exited with unsaved changes in the previous session; refreshing workspace to recover changes.
!ENTRY org.eclipse.osgi 4 0 2011-12-09 10:50:35.553
!MESSAGE An error occurred while automatically activating bundle com.android.ide.eclipse.ddms (351).
!STACK 0
org.osgi.framework.BundleException: Exception in com.android.ide.eclipse.ddms.DdmsPlugin.start() of bundle com.android.ide.eclipse.ddms.
有人知道问题出在哪里吗?