我如何获得Eclipse能够识别R和资源,Android的月球着陆? [英] How do I get Eclipse to recognize R and the resources in Android's Lunar Lander?

查看:164
本文介绍了我如何获得Eclipse能够识别R和资源,Android的月球着陆?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图创建月球着陆器的例子为Android在Eclipse中,但一些code未编译。随时随地在code引用R。是给我的错误。起初有人说是R无法识别或声明的,所以我通过快速修复菜单进口它的Andr​​oid。但现在是在R后所引用的资源没有得到认可。

I'm trying to create the Lunar Lander example for Android in Eclipse, but some of the code is not compiling. Anywhere in the code that references "R." is giving me errors. At first it was saying that R was not recognized or declared, so I imported it from Android via the quick fix menu. But now the resources that are referenced after the R are not being recognized.

我该如何解决这个问题?谢谢!

How can I fix this? Thanks!

推荐答案

我觉得你导入android.R u必须导入com.example.android.lunarlander.R

I think u import android.R U have to import com.example.android.lunarlander.R

这篇关于我如何获得Eclipse能够识别R和资源,Android的月球着陆?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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