Android Studio R.java [英] Android Studio R.java

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

问题描述

我发现旧设备在多个新设备上运行时崩溃:

I'm seeing a crash on an older device that works on multiple newer devices:

android.content.res.Resources$NotFoundException: Resource ID #0x7f030035

如果我没记错的话,您可以查看 R.java 以查看罪魁祸首,但是在 Android Studio 中它似乎不存在.R.java 在哪里,以便我可以关联该 ID?

If I recall correctly you could look at the R.java to see the culprit, however in Android Studio it doesn't seem to exist. Where is the R.java so I can correlate that ID?

谢谢.

推荐答案

在 Android Studio 1.1.0 中,R.java 文件位于

In Android Studio 1.1.0 the R.java file is under

Project/app/build/generated/source/r/debug/com.android.'projectname'/R.java

如果没有看到上述文件夹集合,请先清理并构建项目.这需要几分钟时间,您将看到 Gradle 在 IDE 底部运行.

If you don't see the above collection of folders, clean and build the project first. It takes a few minutes and you'll see Gradle running at the bottom of the IDE.

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

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