When building an Expo dev client for Android, the build process fails with a Gradle error related to the minSdkVersion
required by the com.revenuecat.purchases:purchases-hybrid-common-ui:10.2.0
library. The build process terminates due to a manifest merger failure, indicating that the minSdkVersion
of 23 in my project (defined by Expo) cannot be smaller than version 24 declared in the RevenueCat library.
Error Message:
[RUN_GRADLEW] /private/var/folders/xw/4k1kxhpx04303l7nwzy641br0000gn/T/eas-build-local-nodejs/7fdf107e-ffb6-4e98-a686-8cd5dc9436de/build/android/app/src/debug/AndroidManifest.xml Error:
[RUN_GRADLEW] uses-sdk:minSdkVersion 23 cannot be smaller than version 24 declared in library [:react-native-purchases-ui] /private/var/folders/xw/4k1kxhpx04303l7nwzy641br0000gn/T/eas-build-local-nodejs/7fdf107e-ffb6-4e98-a686-8cd5dc9436de/build/node_modules/react-native-purchases-ui/android/build/intermediates/merged_manifest/debug/AndroidManifest.xml as the library might be using APIs not available in 23
[RUN_GRADLEW] Suggestion: use a compatible library with a minSdk of at most 23,
[RUN_GRADLEW] or increase this project's minSdk version to at least 24,
[RUN_GRADLEW] or use tools:overrideLibrary="com.revenuecat.purchases.react.ui" to force usage (may lead to runtime failures)
[RUN_GRADLEW] FAILURE: Build failed with an exception.
[RUN_GRADLEW] * What went wrong:
[RUN_GRADLEW] Execution failed for task ':app:processDebugMainManifest'.
[RUN_GRADLEW] > Manifest merger failed : uses-sdk:minSdkVersion 23 cannot be smaller than version 24 declared in library [:react-native-purchases-ui] /private/var/folders/xw/4k1kxhpx04303l7nwzy641br0000gn/T/eas-build-local-nodejs/7fdf107e-ffb6-4e98-a686-8cd5dc9436de/build/node_modules/react-native-purchases-ui/android/build/intermediates/merged_manifest/debug/AndroidManifest.xml as the library might be using APIs not available in 23
[RUN_GRADLEW] Suggestion: use a compatible library with a minSdk of at most 23,
[RUN_GRADLEW] or increase this project's minSdk version to at least 24,
[RUN_GRADLEW] or use tools:overrideLibrary="com.revenuecat.purchases.react.ui" to force usage (may lead to runtime failures)
Environment:
- React Native version: "0.73.5"
- react-native-purchases version: "^7.24.0"
- react-native-purchases-ui version: "^7.24.0"
- Expo version: "^50.0.13"
The build process for iOS Expo dev client completes successfully without any issues.
Could there be something in my configuration causing this issue specifically with Android? I would appreciate any suggestions or tips on how to resolve this.