NetBeans 中的 Android 项目中缺少 R.java [英] R.java Missing in Android Project in NetBeans

查看:30
本文介绍了NetBeans 中的 Android 项目中缺少 R.java的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为 AP 计算机科学的一个项目做这个.

I'm doing this for a project in AP Computer Science.

基础知识:
Mac OS X 10.5.8
NetBeans 7.0
Android SDK 3.0(级别 11)

Basics:
Mac OS X 10.5.8
NetBeans 7.0
Android SDK 3.0 (Level 11)

所以我正在 NetBeans 中尝试一些 Android API 演示(我更喜欢它而不是 Eclipse)并且我使用 samplesandroid-11ApiDemos 作为源.R.java 文件未生成并且包 R 不存在".我查看了其他答案,他们说清理并构建项目,但该选项在 NetBeans 中灰显(清理"和构建"选项也是如此).在切换到 Eclipse 之前我应该​​尝试什么?如果我需要更改操作系统,我还有一台运行 Windows 7 的计算机.谢谢!

So I'm trying out some of the Android API Demos in NetBeans (I prefer it over Eclipse) and I'm using samplesandroid-11ApiDemos for the source. The R.java file is not generating and "package R does not exist". I've looked at other answers, and they say to Clean and Build the Project, but that option is grayed out in NetBeans (so are just the "Clean" and "Build" options). Any ideas on what I should try before I switch to Eclipse? I also have a computer running Windows 7 if I need to change the OS. Thanks!

推荐答案

右键单击您的项目并点击构建.它将为您生成缺少的 R 类.至少它在 Netbeans 7.1 中对我有用

Right-click your project and hit build. It will generate the missing R class for you. At least it did for me in Netbeans 7.1

这篇关于NetBeans 中的 Android 项目中缺少 R.java的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆