无法在 netbeans 上运行 android 项目:此工具已弃用错误

发布于 2024-10-21 09:16:30 字数 1590 浏览 3 评论 0原文

我已经安装了 android for windows,并想在 netbeans 6.8 上进行开发。我使用nbandrdoid插件,android平台2.3.3 API 10修订版1,android sdk工具修订版10,android sdk平台工具修订版3。我已将平台添加到netbeans并创建一个项目,就像一切都很好,直到我运行项目并在控制台上获取此输出,

init:
deps-jar:
Compiling 1 source file to C:\Users\dummy\Documents\NetBeansProjects\MyAndroidApplication\build\classes
compile:
Updating zip: C:\Users\dummy\Documents\NetBeansProjects\MyAndroidApplication\dist\MyAndroidApplication.apk_

THIS TOOL IS DEPRECATED. See --help for more information.

Deleting: C:\Users\dummy\Documents\NetBeansProjects\MyAndroidApplication\dist\MyAndroidApplication.apk_
jar:
Result: -1

模拟器根本没有显示。我的第一个项目代码是这样的 包org.me.myandroidapplication;

import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;

/**
 *
 * @author dummy
 */
public class MainActivity extends Activity {

    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle icicle) {
        super.onCreate(icicle);
        // ToDo add your GUI initialization code here
    }
}

我应该做什么?感谢您的宝贵时间。

-----更新-----

我终于可以修复这个错误了。起初,我打算离线安装android SDK,而不是使用SDK Manager。因此,我按照此说明下载了我需要的组件。一切都正确提取,除了当我使用 IZArc 提取平台时,位于 /platform/images/ 中的文件 kernel-qemu 未提取。但是,当我从 IZArc 手动选择文件并将其拖动到提取的任何文件夹时。因此,由于模拟器问题,netbeans 控制台输出就像冻结一样,并且不显示与该问题相对应的任何消息。也许这与 IZArc 配置有关,但这个错误让我损失了近一周的时间!

I've installed android for windows and want to develop on netbeans 6.8. I use nbandrdoid plugin, android platform 2.3.3 API 10 revision 1, android sdk tools revision 10, android sdk platform-tools revision 3. I've added the platform to netbeans and create a project, it's like everything is fine until I run the project and get this output at the console

init:
deps-jar:
Compiling 1 source file to C:\Users\dummy\Documents\NetBeansProjects\MyAndroidApplication\build\classes
compile:
Updating zip: C:\Users\dummy\Documents\NetBeansProjects\MyAndroidApplication\dist\MyAndroidApplication.apk_

THIS TOOL IS DEPRECATED. See --help for more information.

Deleting: C:\Users\dummy\Documents\NetBeansProjects\MyAndroidApplication\dist\MyAndroidApplication.apk_
jar:
Result: -1

the emulator doesn't showed up at all. my first project code is like this
package org.me.myandroidapplication;

import android.app.Activity;
import android.os.Bundle;
import android.widget.TextView;

/**
 *
 * @author dummy
 */
public class MainActivity extends Activity {

    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle icicle) {
        super.onCreate(icicle);
        // ToDo add your GUI initialization code here
    }
}

What am I supposed to do? thanks for your time.

----- UPDATE -----

I finally can fix this error. At first, I planned to install android SDK offline rather than using SDK Manager. So I followed up this instruction and downloaded the components I need. Everything is extracted correctly except that when I extract the platform using IZArc the file kernel-qemu which located in /platform/images/ is not extracted. But when I manually choose the file from IZArc and drag it to any folder it's extracted. Therefore netbeans console output is like freezing because of that emulator issue and it not show any message that corresponds to that problem. Maybe this is about IZArc configuration but this error cost me for almost a week!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

滴情不沾 2024-10-28 09:16:30

我发现 Eclipse 比 Netbeans 更适合 Android 开发,也许可以尝试一下?

I found Eclipse to work way better for android development than Netbeans, maybe give it a try?

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