gpt4 book ai didi

java - Android Studio 无法正确显示 xml 文件

转载 作者:太空宇宙 更新时间:2023-11-03 13:40:25 24 4
gpt4 key购买 nike

Android Studio 突然在 xml 文件中显示自动生成的代码。我试过使缓存无效/重新启动,但它没有解决问题。我也曾尝试清理项目并重建它,但它也不起作用。即使一切都在编辑器中正确显示,如 sublime text。这是 android studio 显示的其中一个 xml 文件的代码。

Code as showing in android studio

Code as shown in sublime text editor

`/* 自动生成的文件。不要修改。 * * 这个类是由 * gradle 插件从它找到的资源数据。它 * 不应手动修改。 */

package com.airbnb.lottie;

public final class R {
private R() {}

public static final class anim {
private anim() {}

public static final int abc_fade_in = 0x7f010000;
public static final int abc_fade_out = 0x7f010001;
public static final int abc_grow_fade_in_from_bottom = 0x7f010002;
public static final int abc_popup_enter = 0x7f010003;
public static final int abc_popup_exit = 0x7f010004;
public static final int abc_shrink_fade_out_from_bottom = 0x7f010005;
public static final int abc_slide_in_bottom = 0x7f010006;
public static final int abc_slide_in_top = 0x7f010007;
public static final int abc_slide_out_bottom = 0x7f010008;
public static final int abc_slide_out_top = 0x7f010009;
}
public static final class attr {
private attr() {}

public static final int actionBarDivider = 0x7f030000;
public static final int actionBarItemBackground = 0x7f030001;
public static final int actionBarPopupTheme = 0x7f030002;
public static final int actionBarSize = 0x7f030003;
public static final int actionBarSplitStyle = 0x7f030004;
public static final int actionBarStyle = 0x7f030005;
public static final int actionBarTabBarStyle = 0x7f030006;
public static final int actionBarTabStyle = 0x7f030007;
public static final int actionBarTabTextStyle = 0x7f030008;
public static final int actionBarTheme = 0x7f030009;
public static final int actionBarWidgetTheme = 0x7f03000a;
public static final int actionButtonStyle = 0x7f03000b;
public static final int actionDropDownStyle = 0x7f03000c;
public static final int actionLayout = 0x7f03000d;
public static final int actionMenuTextAppearance = 0x7f03000e;
public static final int actionMenuTextColor = 0x7f03000f;
public static final int actionModeBackground = 0x7f030010;
public static final int actionModeCloseButtonStyle = 0x7f030011;
public static final int actionModeCloseDrawable = 0x7f030012;
public static final int actionModeCopyDrawable = 0x7f030013;
public static final int actionModeCutDrawable = 0x7f030014;
public static final int actionModeFindDrawable = 0x7f030015;
public static final int actionModePasteDrawable = 0x7f030016;
public static final int actionModePopupWindowStyle = 0x7f030017;
public static final int actionModeSelectAllDrawable = 0x7f030018;
public static final int actionModeShareDrawable = 0x7f030019;
public static final int actionModeSplitBackground = 0x7f03001a;
public static final int actionModeStyle = 0x7f03001b;
public static final int actionModeWebSearchDrawable = 0x7f03001c;
public static final int actionOverflowButtonStyle = 0x7f03001d;
public static final int actionOverflowMenuStyle = 0x7f03001e;
public static final int actionProviderClass = 0x7f03001f;
public static final int actionViewClass = 0x7f030020;
public static final int activityChooserViewStyle = 0x7f030021;
public static final int alertDialogButtonGroupStyle = 0x7f030025;
public static final int alertDialogCenterButtons = 0x7f030026;
public static final int a`

最佳答案

只需将现有项目复制到另一个文件夹,然后用android studio重新打开项目,它就会再次正常显示。

今天我遇到了这个问题,当我打开一个 java 文件时,android studio 向我显示了 XML 文件。

关于java - Android Studio 无法正确显示 xml 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53021904/

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