Unable to Find XML Tags for com.kizitonwose.calendar.view.CalendarView Library

30 Views Asked by At

Hi Stack Overflow community,

I am trying to integrate the com.kizitonwose.calendar.view.CalendarView library into my Android project, but I am facing an issue. After adding the dependency and including the necessary XML tags in my layout file, I am unable to resolve the XML tags for the CalendarView class.

Here's my XML layout code:

<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    tools:context=".StudentPanel.Attendance.StudentAttendanceFragment"
    android:background="@color/bg_color"
    android:padding="16dp">

    <androidx.cardview.widget.CardView
        android:id="@+id/cv_calendar"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:cardUseCompatPadding="true"
        android:layout_marginTop="4dp"
        android:foreground="?android:attr/selectableItemBackground"
        app:cardCornerRadius="10dp"
        app:contentPadding="10dp"
        android:backgroundTint="@color/bg_card_color"
        app:cardElevation="4dp">

        <com.kizitonwose.calendar.view.CalendarView
            android:id="@+id/calendarView"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            app:cv_dayViewResource="@layout/calendar_day_layout"
            app:cv_monthHeaderResource="@layout/calendar_day_titles_container" />

    </androidx.cardview.widget.CardView>

</FrameLayout>

And here's my Gradle code:

plugins {
    id("com.android.application")
}

android {
    // ... (rest of my existing configuration)
}

dependencies {
    // ... (rest of myexisting dependencies)

    implementation ("com.github.kizitonwose:CalendarView:1.1.0")
}

However, I am encountering a "class not found" error for the CalendarView XML tag. I have already added the library to my dependencies, and the project builds without any issues.

Any suggestions on what might be causing this problem or how to resolve it would be greatly appreciated.

Thank you!

0

There are 0 best solutions below