After migrating to Android Studio 3.2, API 28, I am getting the following error on my app's layout:
The layout in layout has no declaration in the base layout folder; this can lead to crashes when the resource is queried in a configuration that does not match this qualifier
One of the layouts that I am getting this error is:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical"
android:background="@null" >
<FrameLayout
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="top|center_horizontal"
android:adjustViewBounds="true"
android:contentDescription="@string/hello_world"
android:src="@drawable/loading_top" />
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="bottom|center_horizontal"
android:adjustViewBounds="true"
android:contentDescription="@string/hello_world"
android:src="@drawable/loading_bottom" />
<ImageView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:contentDescription="@string/hello_world"
android:background="@color/white"
android:layout_marginBottom="5dp"
android:paddingTop="10dp"
android:paddingBottom="10dp"
android:src="@drawable/loading_logo" />
<ImageView
android:id="@+id/loading"
android:layout_width="fill_parent"
android:layout_height="match_parent"
android:layout_gravity="center|center_vertical"
android:layout_marginBottom="0dp"
android:layout_marginTop="0dp"
android:contentDescription="@string/hello_world"
android:scaleType="fitXY"
android:src="@null" />
</FrameLayout>
</LinearLayout>
I get the error on the first line of the first LinearLayout.
Does anyone know how to solve this error?
Thank you
UPDATE: Answered my question with what has resolved the problem for me
In my case closing and reopening Android studio solved the problem. Rebuilding the project or clearing the cache didn't help.