-
Notifications
You must be signed in to change notification settings - Fork 3
Description
Description :
Hello,
I am integrating Detox (E2E testing) into my project running on React Native 0.76.7. Since version 0.76, React Native enforces a minSdkVersion of 24.
The Issue My application compiles and runs perfectly in standard modes (assembleDebug, installDebug).
However, the build fails specifically when running Android Instrumentation Tests (assembleAndroidTest), which is required for Detox.
When running this task, Gradle processes the test manifest of the library itself. This causes a conflict because @didomi/react-native declares minSdkVersion=21 internally, while its dependency react-android (v0.76+) now requires 24.
Error Log :
Running ./gradlew assembleAndroidTest results in:
Execution failed for task ':didomi_react-native:processDebugAndroidTestManifest'.
> Manifest merger failed : uses-sdk:minSdkVersion 21 cannot be smaller than version 24 declared in library [com.facebook.react:react-android:0.76.7]
Suggestion: use a compatible library with a minSdk of at most 21,
or increase this project's minSdk version to at least 24
Root Cause :
The issue comes from the library's android/gradle.properties defaulting to API 21:
Properties
Didomi_minSdkVersion=21
Reproduction Steps :
Use a React Native 0.76+ project.
Install didomi & detox
Run cd android && ./gradlew assembleDebug assembleAndroidTest -DtestBuildType=debug (Essential step: standard build won't fail, only the test build).
Suggested Solution
Please update the default Didomi_minSdkVersion to 24 in the gradle.properties file to align with React Native 0.76+ requirements.
Thanks!