The booking_calendar package is currently experiencing build failures and compatibility issues due to outdated Gradle, Android SDK, and Kotlin configurations. These issues are causing conflicts with the latest versions of Flutter and Android SDK dependencies.
Issues Identified:
Gradle and Android SDK Version Mismatch:
The current compileSdkVersion is set to 31, but some dependencies (such as androidx.fragment, androidx.lifecycle, and androidx.core) require a compileSdkVersion of 34, resulting in build failures.
Kotlin Version Warning:
Flutter has raised a warning indicating that the project is using Kotlin version 1.6.10, which is below the minimum supported version of 1.7.0. An upgrade is required to avoid deprecation warnings.
Android 12+ android:exported Requirement:
Activities with intent-filters need the android:exported attribute explicitly defined to comply with Android 12+ requirements. This attribute is currently missing, leading to build failures when targeting API level 31 and above.
Proposed Solution:
Gradle and SDK Version Upgrade:
Update the compileSdkVersion and targetSdkVersion to 34 to meet the new requirements of the dependencies.
Kotlin Version Update:
Upgrade the Kotlin version to 1.7.0 to align with Flutter's minimum supported version and resolve deprecation warnings.
Manifest Updates:
Add the android:exported attribute to activities in the AndroidManifest.xml to ensure compliance with Android 12+ requirements.
@chiragdhunna thank you very much for the detailed issue description and fix. I will accept it, but wouldn't it be reasonable or a must have to update the pubspec dependencies with it as well, like intl?
Description:
The
booking_calendar
package is currently experiencing build failures and compatibility issues due to outdated Gradle, Android SDK, and Kotlin configurations. These issues are causing conflicts with the latest versions of Flutter and Android SDK dependencies.Issues Identified:
Gradle and Android SDK Version Mismatch:
The current
compileSdkVersion
is set to 31, but some dependencies (such asandroidx.fragment
,androidx.lifecycle
, andandroidx.core
) require acompileSdkVersion
of 34, resulting in build failures.Kotlin Version Warning:
Flutter has raised a warning indicating that the project is using Kotlin version
1.6.10
, which is below the minimum supported version of1.7.0
. An upgrade is required to avoid deprecation warnings.Android 12+
android:exported
Requirement:Activities with
intent-filters
need theandroid:exported
attribute explicitly defined to comply with Android 12+ requirements. This attribute is currently missing, leading to build failures when targeting API level 31 and above.Proposed Solution:
Gradle and SDK Version Upgrade:
Update the
compileSdkVersion
andtargetSdkVersion
to 34 to meet the new requirements of the dependencies.Kotlin Version Update:
Upgrade the Kotlin version to
1.7.0
to align with Flutter's minimum supported version and resolve deprecation warnings.Manifest Updates:
Add the
android:exported
attribute to activities in theAndroidManifest.xml
to ensure compliance with Android 12+ requirements.