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 fail due to minSdkVersion conflict

See original GitHub issue

Description

After install this package, I got build error on Android

Error: uses-sdk:minSdkVersion 16 cannot be smaller than version 21 declared in library [:react-native-image-picker]
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.imagepicker" to force usage (may lead to runtime failures)

Should I have to increase minSdkVersion to use this package?

How to repeat issue and example

  • install package
  • run react-native run-android

Solution

Additional Information

  • Image Picker version: 3.1.2
  • React Native version: 0.63.3
  • Platform: Android
  • Development Operating System: MacOS
  • Dev tools: Android SDK 29

Issue Analytics

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

github_iconTop GitHub Comments

18reactions
brendan1809commented, Dec 29, 2020

android -> build.gradle

buildscript {
  ...
        minSdkVersion = 21
  ...
}
3reactions
ravirajn22commented, Dec 29, 2020

0.63.3 does not support SDK less than 21. So only we also upgraded and we might have used code only available in sdk 21 and above. So don’t use minSdkVersion less than 21.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Struggling to get Android build working due to minSdkVersion
I am unsure why regular Android builds succeed and Detox builds fail, but the fix is to edit the library's android/build.gradle and change ......
Read more >
AAPT2 - Android Developers
AAPT2 (Android Asset Packaging Tool) is a build tool that Android Studio and Android Gradle Plugin use to compile and package your app's ......
Read more >
Fix conflict with dependency, Resolved versions for app diff
I came across this error in Android, when I create a project with minSDK 21 and target/ compile SDK 26: Error :Execution failed...
Read more >
Manifest merger failed: uses-sdk:minSdkVersion 16 cannot be ...
Explained the solution for the error "Manifest merger failed : uses-idk: minSdkVersion 16 cannot be smaller than version 19 declared in ...
Read more >
Manifest merger for wear apk fails incorrectly in ... - Issue Tracker
Manifest merger seems to incorrectly identify minSDKVersion of 24, even though it is not present in our manifest nor build.gradle nor any of...
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