NetBeans Android 插件出错

发布于 2024-10-20 00:00:58 字数 1584 浏览 1 评论 0原文

我目前正在开发一个 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

你的心境我的脸 2024-10-27 00:00:58

刚刚遇到同样的问题。它似乎与 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 项目(不是所有项目)的文件夹移动到不包含空格的路径。

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>

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.

魂归处 2024-10-27 00:00:58

事实上,这是 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文