NetBeans Android插件出错
我目前正在开发一个Android应用程序,我正在使用Netbeans 6.9.1和nbandroid 1.0测试版。我已经安装了Android SDK并配置了所有东西,但是当我创建一个简单的项目并尝试构建它时,会出现一个错误NetBeans Android插件出错,android,netbeans,netbeans-6.9,netbeans-plugins,Android,Netbeans,Netbeans 6.9,Netbeans Plugins,我目前正在开发一个Android应用程序,我正在使用Netbeans 6.9.1和nbandroid 1.0测试版。我已经安装了Android SDK并配置了所有东西,但是当我创建一个简单的项目并尝试构建它时,会出现一个错误 Creating output directories if needed... Created dir: C:\Documents and Settings\KeSoLK\My Documents\NetBeansProjects\AndroidApplication2\
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}
、${mediate.dex}
或${build.classes.dir}
包含空格,则项目将不会运行
批处理文件的参数必须用“…”封装。但是当ant启动批处理文件时,如何做到这一点呢
我的快速解决方法是将netbeans android项目(并非所有项目)的文件夹移动到不包含空格的路径。事实上,这是android SDK的“路径中的空格”问题
除此之外,我强烈建议您更新到新版本的NetBeans和NBAndroid插件。您在Eclipse中遇到了什么问题?请尝试
Eclipse
。。android开发的最佳环境