重复的 id 布局错误 [英] Duplicate id layout error

查看:25
本文介绍了重复的 id 布局错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的布局内的 TextView 出现以下错误.

I've got the following error in a TextView inside my layout.

重复的 id @+id/communications,已经在前面定义了布局

Duplicate id @+id/communications, already defined earlier in this layout

但它不是重复的.我不知道为什么以及是什么导致了这个错误.请帮忙!

But it is not duplicated. I don't know why and what causes this error. Please help!

推荐答案

只需 Clean 项目.有时是 eclipse 的问题,它没有重新索引/重建包含所有资源 ID 的 R 文件.所以干净应该可以解决问题.

Just Clean the project. Sometimes it is the issue of the eclipse that it does not reindex/rebuild the R file containing all the resources IDs. So clean should resolve the problem.

这篇关于重复的 id 布局错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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