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.

Minimum SDK version - it wants 23 not 16

See original GitHub issue

I was trying to get my own project working and hitting issues - so thought I’d try the example in the git repo.

The only way I could get it to work was by changing the minSdkVersion from 16 to 23.

I see that #13 appears to be the same issue but is marked as closed.

Could it be that there’s a regression between 2.30 and 2.4.4?

Obviously changing this setting in my project has fixed it but wondered whether it was just my environment or whether updating the example is now required.

cheers,

g


diff --git a/example/android/build.gradle b/example/android/build.gradle
index 5d5d188..047ea3c 100644
--- a/example/android/build.gradle
+++ b/example/android/build.gradle
@@ -3,7 +3,7 @@
 buildscript {
     ext {
         buildToolsVersion = "28.0.3"
-        minSdkVersion = 16
+        minSdkVersion = 23
         compileSdkVersion = 28
         targetSdkVersion = 28
     }

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
AdrianBordeianucommented, Sep 10, 2020

The issue is not fixed, the manifest does not have uses-sdk line, only after I add both this <uses-sdk tools:overrideLibrary="androidx.security" /> in react-native-encrypted-storage Manifest Screenshot 2020-09-10 at 08 59 57

and multiDexEnabled true (in app build.gradle defaultConfig) implementation ‘androidx.multidex:multidex:2.0.1’ (in app build.gradle)

it works

1reaction
emeraldsantocommented, Jul 7, 2020

Hi! Thanks for reporting, I just checked and indeed, you need to add a special anotation to the root tag of your AndroidManifest.xml:

<!--
    Overrides warning about AndroidX Security package only running on API 23+
    There is a runtime check to make sure that this API is not accessed below API 23
-->
<uses-sdk tools:overrideLibrary="androidx.security" />

There is a runtime check in this library making sure to use the normal SharedPreferences when on API 23 or lower. I will add this to the docs, unfortunately I could not find a better way to handle this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

uses-sdk:minSdkVersion 16 cannot be smaller than version ...
android - uses-sdk:minSdkVersion 16 cannot be smaller than version 23 declared in library - Stack Overflow. Stack Overflow for Teams – Start ...
Read more >
<uses-sdk> | Android Developers
Lets you express an application's compatibility with one or more versions of the Android platform, by means of an API Level integer.
Read more >
why minSdkVersion set from 16 to 23 · Issue #749 - GitHub
As far as our app is concerned: this is the only plugin that requires a minimum SDK 23 out of the 30 we...
Read more >
How to change Minimum SDK and Target SDK Version of
How to change Minimum SDK and Target SDK Version - Android Studio tutorial || Minimum SDK version || Target SDK versionFollow me on ......
Read more >
Manifest merger failed: uses-sdk:minSdkVersion 16 cannot be ...
Minimum supported Gradle version is 7.4. · Lore: Deadly Currents · Fix "The SafetyNet Attestation API is being discontinued and replaced by the ......
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