Skip to content

Android build fails for libs with minSdkVersion 17 with react-native 0.64 #2712

@Andarius

Description

@Andarius

Describe the bug

The following command fails after upgrading to RN 0.64

./gradlew assembleDebug assembleAndroidTest -DtestBuildType=debug

With the following message (only this library seems to fail).

> Task :react-native-pager-view:processDebugAndroidTestManifest FAILED
[androidx.vectordrawable:vectordrawable-animated:1.0.0] /.gradle/caches/transforms-2/files-2.1/3050775700026023c1db3db79ab19a97/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.
/node_modules/react-native-pager-view/android/build/intermediates/tmp/manifest/androidTest/debug/manifestMerger2807704319365703146.xml:5:5-74 Error:
        uses-sdk:minSdkVersion 17 cannot be smaller than version 21 declared in library [com.facebook.react:react-native:0.64.0] /.gradle/caches/transforms-2/files-2.1/4e32a44ca1590525038237dd6b47cd32/jetified-react-native-0.64.0/AndroidManifest.xml as the library might be using APIs not available in 17
        Suggestion: use a compatible library with a minSdk of at most 17,
                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)

See http://g.co/androidstudio/manifest-merger for more information about the manifest merger.

Running ./gradlew assembleDebug or ./gradlew bundleRelease then npx react-native run-android --variant=release works fine.

Maybe this issue should be posted in the react-native-pager-view repo but as I can only reproduce when running the detox build command I'm asking here first.

Steps To Reproduce

  • I have tested this issue on the latest Detox release and it still reproduces

Expected behavior

Build should not fail with this error.

Detox Trace-Logs

NA

Device logs (adb logcat)

NA

Environment (please complete the following information):

  • Detox: 18.9.0
  • React Native: 0.64.0
  • Node: v14.8.0
  • Device: NA
  • OS: KDE neon User Edition 5.21
  • Test-runner (select one): jest-circus

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions