gpt4 book ai didi

java - 错误的 R.java 绘图生成

转载 作者:行者123 更新时间:2023-11-29 08:48:30 25 4
gpt4 key购买 nike

嘿嘿,

我有一个关于 R.java 文件的问题。实际上,我自己是通过在所有可绘制文件夹(mdpi、hdpi 等)中创建一个名为“ic_tab_debate.png”的可绘制图标以及在名为“ic_tab_debate.xml”的可绘制文件夹中创建 XML 文件而引起的。这当然导致了问题。但是删除XML文件后R.java中仍然有问题!

R.java 文件的可绘制部分如下所示:

public static final class drawable {
public static final int =0x7f020022; //Here is the problem
public static final int common_signin_btn_icon_dark=0x7f020000;
public static final int common_signin_btn_icon_disabled_dark=0x7f020001;
public static final int common_signin_btn_icon_disabled_focus_dark=0x7f020002;
public static final int common_signin_btn_icon_disabled_focus_light=0x7f020003;
public static final int common_signin_btn_icon_disabled_light=0x7f020004;
public static final int common_signin_btn_icon_focus_dark=0x7f020005;
public static final int common_signin_btn_icon_focus_light=0x7f020006;
public static final int common_signin_btn_icon_light=0x7f020007;
public static final int common_signin_btn_icon_normal_dark=0x7f020008;
public static final int common_signin_btn_icon_normal_light=0x7f020009;
public static final int common_signin_btn_icon_pressed_dark=0x7f02000a;
public static final int common_signin_btn_icon_pressed_light=0x7f02000b;
public static final int common_signin_btn_text_dark=0x7f02000c;
public static final int common_signin_btn_text_disabled_dark=0x7f02000d;
public static final int common_signin_btn_text_disabled_focus_dark=0x7f02000e;
public static final int common_signin_btn_text_disabled_focus_light=0x7f02000f;
public static final int common_signin_btn_text_disabled_light=0x7f020010;
public static final int common_signin_btn_text_focus_dark=0x7f020011;
public static final int common_signin_btn_text_focus_light=0x7f020012;
public static final int common_signin_btn_text_light=0x7f020013;
public static final int common_signin_btn_text_normal_dark=0x7f020014;
public static final int common_signin_btn_text_normal_light=0x7f020015;
public static final int common_signin_btn_text_pressed_dark=0x7f020016;
public static final int common_signin_btn_text_pressed_light=0x7f020017;
public static final int ic_launcher=0x7f020018;
public static final int ic_launcher_sw=0x7f020019;.......

但是,删除 R.java 文件并清理项目并没有解决我的问题。错误的R.java总是重新生成。有没有名称的资源,但我不知道如何从中删除这个 =0x7f020022。

提前感谢您的帮助:)

最佳答案

删除R.java并重启eclipse确保 drawables 文件不是大写字母

关于java - 错误的 R.java 绘图生成,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23917900/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com