Skip to content

Conversation

@imrankhalid001
Copy link

🔧 Overview

This PR fixes several build and runtime issues that appeared after updating the project to Gradle 8+, Kotlin 1.9+, and Android SDK 35.
It also adds support for Android 15 (API 35), improves app stability, and updates several key dependencies.

🐛 Main Issues Fixed

BuildConfig not found due to missing namespace setup.
Unresolved references for lifecycle, ViewModelInject, and Hilt classes.
Manifest merger and namespace errors after Gradle upgrade.
Kapt compilation failure (KaptWithoutKotlincTask issue).
PendingIntent crash on Android 12+ (FLAG_IMMUTABLE requirement).
WorkManager crash in MyWorker caused by old PendingIntent usage.
Resource formatting error in share_message string.

🧩 Fixes and Updates

Added proper namespace in build.gradle.
Updated Hilt, Lifecycle, and WorkManager dependencies.
Replaced deprecated @ViewModelInject with @hiltviewmodel.
Updated Gradle plugin to 8.6.1 and Kotlin to 1.9.x.
Added FLAG_IMMUTABLE for PendingIntents (Android 12+).
Included runtime notification permission for Android 13+.
Upgraded targetSdkVersion and compileSdkVersion to 35 (Android 15).
Migrated project to Java 17 compatibility.

🚀 Enhancements

Full Android 15 support.
Better stability and build performance with Gradle 8+.
Clean and consistent dependency versions across the project.
Verified smooth app launch and no runtime crashes on devices from API 21–35.

🧪 Tested On

✅ Build verified successfully.
✅ WorkManager tasks running as expected.
✅ Notifications working with proper permissions.
✅ App tested on Android 12, 13, and 15 emulators.

…ndroid 15 support

- Fixed multiple Gradle and dependency-related build errors
- Resolved 'Unresolved reference' issues for BuildConfig, lifecycle, and ViewModelInject
- Addressed PendingIntent crash by applying FLAG_IMMUTABLE for Android 12+
- Added Android 15 (API 35) compatibility and updated targetSdkVersion
- Implemented runtime notification permission handling for Android 13+
- Updated Hilt, WorkManager, and Lifecycle dependencies to latest stable versions
- Removed deprecated Gradle configurations and ensured Gradle 8+ compatibility
- Verified clean project build with Kotlin 1.9 and Java 17
Updated Readfile with latest changes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant