0
votes

I'm trying to launch an Android App which was generated with Ionic, but I got an Error:

Manifest merger failed : uses-sdk:minSdkVersion 1 cannot be smaller than version 4 declared in library [com.commit451:PhotoView:1.2.4] /Users/gediminassukys/.gradle/caches/transforms-1/files-1.1/PhotoView-1.2.4.aar/ffdb107897f674c9e99efaa7549d295e/AndroidManifest.xml as the library might be using APIs not available in 1 Suggestion: use a compatible library with a minSdk of at most 1, or increase this project's minSdk version to at least 4, or use tools:overrideLibrary="uk.co.senab.photoview" to force usage (may lead to runtime failures)

Android Studio after this error suggest me this:

Suggestion: use a compatible library with a minSdk of at most 1, or increase this project's minSdk version to at least 4, or use tools:overrideLibrary="uk.co.senab.photoview" to force usage (may lead to runtime failures)

1
Are you using any PhotoView library if yes try to change the minimum SDK level 10 4yash786
Yes, I'm. Where can I change it? If I do this in build.gradle defaultMinSdkVersion=1, I still get the same errorGediminas
Make defaultMinSdkVersion=4 I'll solve your issue if this issue still persists let me know.yash786
Already did, same error!Gediminas
you might want to rebuild project after clearing cacheHossam Hassan

1 Answers

2
votes

In order to use the given library you have to set the minimum sdk version supported to 4 . defaultMinSdkVersion=4, this will fix the problem you are facing.