Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android build fails for AndroidTest with minSdkVersion 17 with react-native 0.64 #83

Open
Merlier opened this issue Jun 18, 2021 · 1 comment

Comments

@Merlier
Copy link

Merlier commented Jun 18, 2021

I'm using Detox for e2e tests and after upgrading to RN 0.64, the app detox build fails.
This issue could concern multiple modules. It's referenced here: wix/Detox#2712

The following command fails after upgrading to RN 0.64
./gradlew assembleDebug assembleAndroidTest -DtestBuildType=debug

With the following message:
`

Task :react-native-settings:processDebugAndroidTestManifest FAILED
[androidx.vectordrawable:vectordrawable-animated:1.0.0] /root/.gradle/caches/transforms-2/files-2.1/bb05b16f135343eba8fb88851c1f8ee9/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.
See http://g.co/androidstudio/manifest-merger for more information about the manifest merger.
/builds/application-mobile/node_modules/react-native-settings/android/build/intermediates/tmp/manifest/androidTest/debug/manifestMerger1695351036710269372.xml:5:5-74 Error:
uses-sdk:minSdkVersion 16 cannot be smaller than version 21 declared in library [com.facebook.react:react-native:0.64.2] /root/.gradle/caches/transforms-2/files-2.1/83fdc6c83523d4af6406d02587819ec5/jetified-react-native-0.64.2/AndroidManifest.xml as the library might be using APIs not available in 16
Suggestion: use a compatible library with a minSdk of at most 16,
or increase this project's minSdk version to at least 21,
or use tools:overrideLibrary="com.facebook.react" to force usage (may lead to runtime failures)
`

I looked for several solutions but the easiest would be to update the gradle android config of react-native-settings, inspired from other gradle file of module like: https://github.com/react-native-async-storage/async-storage/blob/master/android/build.gradle

Merlier pushed a commit to Merlier/react-native-settings that referenced this issue Jun 18, 2021
@Merlier
Copy link
Author

Merlier commented Jun 18, 2021

I pushed a PR to fix this issue. #83

@erezrokah erezrokah removed their assignment Dec 29, 2023
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

No branches or pull requests

2 participants