question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

Environment

  • react-native-pager-view: 5.1.2
  • React Native: 0.64.0
  • Node: v14.8.0

Description

The following command fails after upgrading to RN 0.64

./gradlew assembleDebug assembleAndroidTest -DtestBuildType=debug

With the following message:

> 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.

Reproducible Demo

Run ./gradlew assembleDebug assembleAndroidTest -DtestBuildType=debug

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

3reactions
troZeecommented, Apr 9, 2021
1reaction
IPWright83commented, Apr 9, 2021

Would it be possible to release this change @troZee as it’s currently causing a problem for us trying to build against react native 0.64?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Android build fails for libs with minSdkVersion 17 with react ...
Describe the bug The following command fails after upgrading to RN 0.64 ./gradlew assembleDebug assembleAndroidTest -DtestBuildType=debug ...
Read more >
Struggling to get Android build working due to minSdkVersion
The issue is that RN 0.64 increased its minSdkVersion from 16 to 21. ... This seems to be a quite common error in...
Read more >
Android App build error - I have no idea what to do
Hi, unfortunately, I now always get an error when I try to build an Android app (both with runtime version 4.5.12 and version...
Read more >
what went wrong: a problem occurred configuring project ':app ...
I'm trying to build a react native package to integrate with an andriod app, I'm using a template android app to test if...
Read more >
React Native Upgrade Helper
Release 0.64. React Native 0.64 includes Hermes opt-in on iOS and React 17. ... Release 0.62. React Native 0.62 includes built-in integration with...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found