无法解析 R [无 admob]

Cannot Resolve R [No admob]

我搜索了其他答案并尝试找到解决方案,我知道有人问过这个问题。

我的 Android Studio 突然找不到 R class (R.raw.blabla)。 找不到任何 R 文件

在其他 classes 中它正在工作。

我尝试了什么:

只有 2 xml 个文件仍然有错误

-没有其他 xml 文件被修改我的意思是默认值

<?xml version="1.0" encoding="utf-8"?>
 <android.support.constraint.ConstraintLayout 
 xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/root_constraint_layout">

<TextView
    android:id="@+id/month_textView"
    style="@style/textStyle"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_marginEnd="8dp"
    android:layout_marginStart="8dp"
    app:layout_constraintEnd_toEndOf="parent"
    app:layout_constraintHorizontal_bias="0.0"
    app:layout_constraintStart_toStartOf="parent"
    app:layout_constraintTop_toTopOf="parent"
    tools:text="Aug" />

<TextView
    android:id="@+id/dayNr_textView"
    style="@style/textStyle"

    app:layout_constraintEnd_toEndOf="@+id/month_textView"
    app:layout_constraintStart_toStartOf="@+id/month_textView"
    app:layout_constraintTop_toBottomOf="@+id/month_textView"
    tools:text="05" />

<TextView
    android:id="@+id/day_textView"
    style="@style/textStyle"

    app:layout_constraintEnd_toEndOf="@+id/dayNr_textView"
    app:layout_constraintStart_toStartOf="@+id/dayNr_textView"
    app:layout_constraintTop_toBottomOf="@+id/dayNr_textView"
    tools:text="Sun" />
  </android.support.constraint.ConstraintLayout>

实际上我找到了一个奇怪的解决方案:

我试图从 Canary(2018 年 9 月 5 日 3 月 11 日)在 stable/beta Android Studio (3.2) 上导入项目 在 stable/beta 频道上,R class 构建成功,我可以导入它。 最后出于好奇,我重新加载了 Canary 版本的项目。一切正常。 不过最后我还是决定留在稳定频道,等RC发布。