Updating Android Project to Gradle 7 leads to "layout.xml: Error: is not annotated as @Input"

Viewed 327

When updating my Android Apps with Android Studio from Gradle 6.7.1 to Gradle 7.0.2 the projects suddenly have build errors.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':libMyAndroidModule:packageDebugResources'.
<path>/src/main/res/layout/blue_progress_background.xml: Error: is not annotated as @Input

Unfortunately I can't find anything about this build error that would usually be related to a Gradle Task not being correctly annotated, yet in this case I can't change anything with the Gradle Task "packageDebugResources" and it's unusual that the xml would be actually responsible for causing this.

blue_progress_background.xml:

<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools">

        <data>

            <variable
                name="viewModel"
                type="com.company.subscriptionuikit.viewmodel.SubscribeViewModel" />

        </data>

    <FrameLayout
        android:id="@+id/blue_background_framelayout"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@color/background_color_main"
        tools:context=".activity.SubscribeActivity">

        <LinearLayout
            android:id="@+id/split_linearlayout"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:orientation="vertical">

            <LinearLayout
                android:id="@+id/outer_spacing_blue_linearlayout"
                android:layout_width="match_parent"
                android:layout_height="0dp"
                android:layout_weight="3"
                android:orientation="vertical">

                <View
                    android:id="@+id/blue_first_spacing_view"
                    android:layout_width="match_parent"
                    android:layout_height="0dp"
                    android:layout_weight="1" />

                <LinearLayout
                    android:id="@+id/processing_text_linearlayout"
                    android:layout_width="260dp"
                    android:layout_height="wrap_content"
                    android:layout_gravity="center"
                    android:gravity="center"
                    android:orientation="vertical">

                    <TextView
                        android:id="@+id/almost_done_textview"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:text="@string/almost_done"
                        android:textColor="@color/text_color_main_colored"
                        android:textSize="22sp" />

                    <TextView
                        android:id="@+id/processing_your_upgrade_textview"
                        android:layout_width="match_parent"
                        android:layout_height="wrap_content"
                        android:text="@string/we_are_processing_your_upgrade_and_updating_your_subscription_this_may_take_a_couple_of_seconds"
                        android:textColor="@color/text_color_main_colored"
                        android:textSize="16sp" />
                </LinearLayout>

                <View
                    android:id="@+id/blue_second_spacing_view"
                    android:layout_width="match_parent"
                    android:layout_height="0dp"
                    android:layout_weight="5" />
            </LinearLayout>

            <ProgressBar
                android:id="@+id/progressBar"
                style="?android:attr/progressBarStyleHorizontal"
                android:layout_width="match_parent"
                android:layout_height="32dp"
                android:layout_marginBottom="-14dp"
                android:indeterminate="true"
                android:indeterminateTint="@color/tint_color_primary"
                android:indeterminateTintMode="src_in" />


            <LinearLayout
                android:id="@+id/outer_spacing_white_linearlayout"
                android:layout_width="match_parent"
                android:layout_height="0dp"
                android:layout_weight="1"
                android:background="?attr/backgroundPrimaryTheme"
                android:orientation="vertical">

                <View
                    android:id="@+id/white_first_spacing_view"
                    android:layout_width="match_parent"
                    android:layout_height="0dp"
                    android:layout_weight="1" />

                <TextView
                    android:id="@+id/continue_using_app_textview"
                    android:layout_width="match_parent"
                    android:layout_height="wrap_content"
                    android:gravity="center"
                    android:onClick="onClickContinueUsingApp"
                    android:text="Continue using App"
                    android:textAllCaps="true"
                    android:textColor="@color/selector_state_tint_blue"
                    android:textStyle="bold" />

                <View
                    android:id="@+id/white_second_spacing_view"
                    android:layout_width="match_parent"
                    android:layout_height="0dp"
                    android:layout_weight="1" />

            </LinearLayout>
        </LinearLayout>

    </FrameLayout>

</layout>

0 Answers
Related