错误使用NetBeans Android插件 [英] Error with NetBeans Android plugin
问题描述
我目前正在开发一个Android应用程序,我使用NetBeans 6.9.1和1.0 nbandroid测试。我已经安装了Android SDK和配置好了一切,但是当我创建一个简单的项目,并尝试建立它给出了一个错误
I am currently developing an Android app and i am using Netbeans 6.9.1 and nbandroid 1.0 beta. I have installed Android SDK and configured everything but when i create a simple project and try to build it gives an error
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)
有什么可以是问题?以及如何解决它。
what can be the problem? and how to solve it.
谢谢!
推荐答案
正好遇到了同样的问题。看来在当时有关系的路径空间的蚂蚁的尝试启动的 dex.bat 的使用参数:
Just encountered the same issue. It seems to be related to spaces in path at the time ant tries to start dex.bat with parameters:
<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
包含空格。
有关批处理文件的参数必须与封装...。但如何做到这一点的时候的蚂蚁的启动批处理文件?
Parameters for batch files have to be encapsulated with "...". But how to do this when ant starts the batch file?
我的快速解决方法是我的NetBeans的Android项目(并非所有项目)的文件夹移动到不包含空格的路径。
My quick workaround was to move the folder of my netbeans android project (not all projects) to a path that doesn't contain spaces.
这篇关于错误使用NetBeans Android插件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!