Android build failure in build 2.3.x with detox artifact
See original GitHub issueDescription
Hi! A fresh react native project integrating with detox, using react-native-reanimated@2.3.x will yield a build failure with following error:
The command I’m running is:
./gradlew assembleDebugAndroidTest -DtestBuildType=debug
> Task :react-native-reanimated:processDebugAndroidTestManifest FAILED
[:react-native-reanimated] /home/root/app/node_modules/react-native-reanimated/android/build/intermediates/merged_manifest/debug/AndroidManifest.xml Warning:
Package name 'com.swmansion.reanimated' used in: :react-native-reanimated, react-native-reanimated-64-jsc.aar.
[androidx.vectordrawable:vectordrawable-animated:1.0.0] /root/.gradle/caches/transforms-3/1a1fc95fdcfb9f6e2e551d13c4ca70dc/transformed/vectordrawable-animated-1.0.0/AndroidManifest.xml Warning:
Package name 'androidx.vectordrawable' used in: androidx.vectordrawable:vectordrawable-animated:1.0.0, androidx.vectordrawable:vectordrawable:1.0.1.
/home/root/app/node_modules/react-native-reanimated/android/build/intermediates/tmp/manifest/androidTest/debug/manifestMerger16221606182624431729.xml:5:5-72 Error:
uses-sdk:minSdkVersion 1 cannot be smaller than version 16 declared in library [react-native-reanimated-64-jsc.aar] /root/.gradle/caches/transforms-3/7a68d808289551ce7ccd09f052f191a4/transformed/jetified-react-native-reanimated-64-jsc/AndroidManifest.xml as the library might be using APIs not available in 1
Suggestion: use a compatible library with a minSdk of at most 1,
or increase this project's minSdk version to at least 16,
or use tools:overrideLibrary="com.swmansion.reanimated" to force usage (may lead to runtime failures)
This issue doesn’t happen when I downgrade to 2.2.4
Expected behavior
Actual behavior & steps to reproduce
Snack or minimal code example
I’m preparing a reproducible example
Package versions
name | version |
---|---|
react-native | 0.64.3 |
react-native-reanimated | 2.3.1 |
NodeJS | v16.13.1 |
Java | openjdk version “11.0.10” 2021-01-19 |
Gradle | 6.7 |
expo | 44.0.6 |
Affected platforms
- Android
- iOS
- Web
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:7
Top Results From Across the Web
Dealing With Problems With Building the App & Detox
This is documentation for Detox 19.x, which is no longer actively maintained. ... A failure occurred while executing com.android.build.gradle.internal.res.
Read more >Enable multidex for apps with over 64K methods
Learn how to enable an app configuration known as multidex, which allows your app to build and read multiple DEX files.
Read more >task :app:checkdebugaarmetadata failed deprecated gradle ...
In the app\build.gradle file, change the property compileSdkVersion 30 to compileSdkVersion 31 . Make sure to download the SDK version 31 from SDK...
Read more >Error:Execution failed for task ':app:compileDebugKotlin ...
Solution: · 1 - Check if kotlin version is same across project · 2 - Run build with parameters like --stacktrace --debug --info...
Read more >Installation | React Native Reanimated - Software Mansion
Specifically on Android the setup consist of adding additional code to the main application ... Turn on Hermes engine by editing android/app/build.gradle.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@jarvisluong I am facing the same issue here. Let me know if you have any progress fixing it. I will do the same if I can fix it here.
I am using react-native-reanimated version 2.3.1 as well. I was at 2.3.0 and detox was running fine.
I noticed that it started to happen after I included expo in my project…
i added this in the reanimated plugin expo/src/linking.gradle defaultConfig{ minSdkVersion safeExtGet(‘minSdkVersion’, 1) }
“react-native-reanimated”: “^2.3.0”,