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.

minSdkVersion 16 cannot be smaller than version 19

See original GitHub issue

I am would like to integrate Razorpay into my react-native app. I have installed the razorpay package and have also linked successfully.

However, when I try to run the app I am getting the following errors:

$ react-native run-android

info Starting JS server...
info Building and installing the app on the device (cd android && ./gradlew app:installDebug)...

> Configure project :react-native-razorpay
WARNING: The specified Android SDK Build Tools version (26.0.3) is ignored, as it is below the minimum supported version (28.0.3) for Android Gradle Plugin 3.3.1.
Android SDK Build Tools 28.0.3 will be used.
To suppress this warning, remove "buildToolsVersion '26.0.3'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.

> Task :app:processDebugManifest FAILED
/Users/kakarnyori/react-native-projects/RazorpayTest/android/app/src/debug/AndroidManifest.xml Error:
        uses-sdk:minSdkVersion 16 cannot be smaller than version 19 declared in library [com.razorpay:checkout:1.5.5] /Users/kakarnyori/.gradle/caches/transforms-1/files-1.1/checkout-1.5.5.aar/a23f27ddc59bc933dbac2f4019e7fbab/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 19,
                or use tools:overrideLibrary="com.razorpay" to force usage (may lead to runtime failures)

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


FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed : uses-sdk:minSdkVersion 16 cannot be smaller than version 19 declared in library [com.razorpay:checkout:1.5.5] /Users/kakarnyori/.gradle/caches/transforms-1/files-1.1/checkout-1.5.5.aar/a23f27ddc59bc933dbac2f4019e7fbab/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 19,
                or use tools:overrideLibrary="com.razorpay" to force usage (may lead to runtime failures)

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 1s
22 actionable tasks: 1 executed, 21 up-to-date
error Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/getting-started.html
error Command failed: ./gradlew app:installDebug. Run CLI with --verbose flag for more details.

I have been using Expo to develop mobile apps, and I am very new to Android development. Could you please tell me how can I fix this?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5

github_iconTop GitHub Comments

35reactions
ratnadeep007commented, May 1, 2019

@KakarN I faced same issue today while using Razorpay react-native package. You’re using expo and it’s clearly mentioned in repo README that: The react native plugin is wrapper around native SDK, so it doesn't work with the tools like expo which doesn't support native modules. You can do expo eject and then following instructions: open build.gradle file in android folder and change the value of minSdkVersion from 16 to 19. Hope this resolves your issue. 😄 sdk-version-fix-razorpay

0reactions
pratham-stackcommented, Jan 4, 2021

Downgrade your version ‘audioplayers: ^0.17.1’ to ‘audioplayers: ^0.16.1’ in pubspec.yaml and pub get the dependencies of ‘audioplayers: ^0.16.1’.

Read more comments on GitHub >

github_iconTop Results From Across the Web

uses-sdk:minSdkVersion 15 cannot be smaller than version ...
1) Go to Build.gradle(Module:app) . · 2) Change minSDKVersion 15 to minSDKVersion 16 . or 17 // 19(for projectfolder/platforms/android/CordovaLib/AndroidManifest ...
Read more >
minSdkVersion 16 cannot be smaller than version 19 declared ...
Hello guys i have a problem which i cannot run the application, it says "minSdkVersion 16 cannot be smaller than version 19 declared......
Read more >
uses-sdk:minSdkVersion 16 cannot be smaller than version ...
Answer: In your app Navigate to android/app/build.gradle and change minsdk from 16 to 21 Hope it will resolve your problem.
Read more >
uses-sdk:minSdkVersion 16 cannot be smaller than version ...
It works for me. open /android/app/build.gradle than update minSdkVersion to 19.
Read more >
flutter: uses-sdk:minSdkVersion 16 cannot be smaller than ...
flutter: uses-sdk:minSdkVersion 16 cannot be smaller than version 19 declared in library A computer programming related memorandum.
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