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)
这可能是什么问题?以及如何解决它。
谢谢 !!
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.
Thanks !!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
刚刚遇到同样的问题。它似乎与 ant 尝试使用参数启动 dex.bat 时路径中的空格有关:
如果
${basedir} ,该项目将不会运行
、${intermediate.dex}
或${build.classes.dir}
包含空格。批处理文件的参数必须用“...”封装。但是当ant启动批处理文件时如何做到这一点呢?
我的快速解决方法是将我的 netbeans android 项目(不是所有项目)的文件夹移动到不包含空格的路径。
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:
The project won't run if
${basedir}
,${intermediate.dex}
or${build.classes.dir}
contain spaces.Parameters for batch files have to be encapsulated with "...". But how to do this when ant starts the batch file?
My quick workaround was to move the folder of my netbeans android project (not all projects) to a path that doesn't contain spaces.
事实上,这是 Android SDK 的“路径中的空间”问题。
除此之外,我强烈建议您更新到 NetBeans 和 NBAndroid 插件的新版本。
Indeed it is a 'space in path' problem of Android SDK.
Other than that I'd strongly recommend you to update to newer version of both NetBeans and NBAndroid plugin.