Windows崩溃后,自定义类转换为R类

时间:2018-11-24 10:26:30

标签: java android android-studio

实际上,我的Android模拟器使Windows计算机崩溃,并且模型,适配器和某些片段类被转换为某种R类。

enter image description here

enter image description here

enter image description here

在BasketAdapter内

/* AUTO-GENERATED FILE.  DO NOT MODIFY.
 *
 * This class was automatically generated by the
 * gradle plugin from the resource data it found. It
 * should not be modified by hand.
 */
package com.facebook.common;

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 = 0x7f030

现在所有这些都这样。

有人知道如何解决此问题吗?

2 个答案:

答案 0 :(得分:0)

您是否尝试过使缓存无效?您可以通过以下方法执行此操作:转到“文件”>“使缓存无效并重新启动”

答案 1 :(得分:0)

如果您在这里,这意味着您很困惑,但我们为您提供了保障。 经过如此多的研究,我发现这很有帮助,所以我在回答自己的问题。

1)首先进入 yourProject \ app \ build \ outputs \ apk \ debug

2) 复制一份调试APK ,并将其放在计算机上的安全位置。

3)转到this链接,从jar文件中获取您的 java代码,然后将粘贴复制粘贴到已转换的文件中。

4)对于XML文件,请转到this链接,并获得与XML文件相同的副本并将其粘贴。

现在你很好。我已经吸取了教训,无论大小项目都始终使用版本控制,我几乎心脏病发作了。