NetBeans Android插件错误

我目前正在开发一个Android应用程序,并且正在使用Netbeans 6.9.1和nbandroid 1.0 beta.我已经安装了Android SDK并配置了所有内容,但是当我创建一个简单的项目并尝试构建它时出现错误

Creating output directories if needed...
Created dir: C:\Documents and Settings\KeSoLK\My Documents\NetBeansProjects\AndroidApplication2\bin
Created dir: C:\Documents and Settings\KeSoLK\My Documents\NetBeansProjects\AndroidApplication2\gen
Created dir: C:\Documents and Settings\KeSoLK\My Documents\NetBeansProjects\AndroidApplication2\bin\classes
Compiling aidl files into Java classes...
Compiling RenderScript files into Java classes and RenderScript bytecode...
Generating R.java / Manifest.java from the resources...
compile:
C:\Documents and Settings\KeSoLK\My Documents\Android\android-sdk-windows\tools\ant\main_rules.xml:384: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
Compiling 2 source files to C:\Documents and Settings\KeSoLK\My Documents\NetBeansProjects\AndroidApplication2\bin\classes
Converting compiled files and external libraries into C:\Documents and Settings\KeSoLK\My Documents\NetBeansProjects\AndroidApplication2\bin\classes.dex...
=C:\Documents was unexpected at this time.
C:\Documents and Settings\KeSoLK\My Documents\Android\android-sdk-windows\tools\ant\main_rules.xml:472: The following error occurred while executing this line:
C:\Documents and Settings\KeSoLK\My Documents\Android\android-sdk-windows\tools\ant\main_rules.xml:203: apply returned: 255
BUILD FAILED (total time: 1 second)

可能是什么问题?以及如何解决它.

谢谢 !!

解决方法:

刚遇到同样的问题.在ant尝试使用参数启动dex.bat时,它似乎与路径中的空格有关:

<exec executable="${dx}" failonerror="true">
            <arg value="--dex"/>
            <arg value="--output=${basedir}/${intermediate.dex}"/>
            <arg value="--positions=lines"/>
            <arg path="${build.classes.dir}"/>
</exec>

如果${basedir},${intermediate.dex}或${build.classes.dir}包含空格,则该项目将无法运行.

批处理文件的参数必须用“ …”封装.但是,当ant启动批处理文件时该怎么办?

我的快速解决方法是将我的netbeans android项目(并非所有项目)的文件夹移动到不包含空格的路径.

上一篇:查询自己的apple购买历史


下一篇:如何在GUI Java中制作功能区(如Office 2013功能区)?