1
votes

I was importing a project to android studio. While syncing I am getting this error. I tried my level best to solve this but I failed all the time.. I seriously don't get this error.

ERROR: Manifest merger failed : uses-sdk:minSdkVersion 7 cannot be smaller than version 14 declared in library [androidx.recyclerview:recyclerview:1.0.0-beta01] C:\Users\abhishekdhyani.gradle\caches\transforms-2\files-2.1\6b4bcb484765b24d3e1d43d0fe4245f4\AndroidManifest.xml as the library might be using APIs not available in 7 Suggestion: use a compatible library with a minSdk of at most 7, or increase this project's minSdk version to at least 14, or use tools:overrideLibrary="androidx.recyclerview" to force usage (may lead to runtime failures)

It is showing that my minsdkversion is 7 while it is 18 in my build.gradle. I don't know how to solve it.

  defaultConfig {
        applicationId "net.bingobey"
        minSdkVersion 18
        targetSdkVersion 28
        versionCode 66
        versionName "2.26"
        multiDexEnabled true
        renderscriptTargetApi 21
        renderscriptSupportModeEnabled true
    }

ERROR: Manifest merger failed : uses-sdk:minSdkVersion 7 cannot be smaller than version 14 declared in library [androidx.recyclerview:recyclerview:1.0.0-beta01] C:\Users\abhishekdhyani.gradle\caches\transforms-2\files-2.1\6b4bcb484765b24d3e1d43d0fe4245f4\AndroidManifest.xml as the library might be using APIs not available in 7 Suggestion: use a compatible library with a minSdk of at most 7, or increase this project's minSdk version to at least 14, or use tools:overrideLibrary="androidx.recyclerview" to force usage (may lead to runtime failures)

1

1 Answers

1
votes

There 2 options to solve this problem: 1. You need to increase the SDK-version in build.gradle(app) or under Settings -> Gradle and/or 2. Change the implementation of your RecyclerView in build.gradle(app) to a lower version. This one you are using here (androidx.recyclerview:recyclerview:1.0.0-beta01) is the newest version. You probably need this: com.android.support:recyclerview-v7 More of this, I suggest to watch this official Android Developer Migrating site: https://developer.android.com/jetpack/androidx/migrate