简体   繁体   中英

Android - Error Manifest merger failed

i just download Android Material (Project Files) from CodeCanyon, but when opened and Build with Android Studio, i get this error :

Error:Execution failed for task ':ListViewAnimations-core-slh:processDebugAndroidTestManifest'.
> java.lang.RuntimeException: Manifest merger failed : uses-sdk:minSdkVersion 1 cannot be smaller than version 7 declared in library [android - AS:StickyListHeaders:unspecified] 

C:\android - AS\ListViewAnimations-core-slh\build\intermediates\exploded-aar\android - AS\StickyListHeaders\unspecified\AndroidManifest.xml

Suggestion: use tools:overrideLibrary="se.emilsjolander.stickylistheaders" to force usage

This Android Material Project contain many modules, one of them that caused error is StickListHeaders , here's the AndroidManifest.xml of StickListHeaders module :

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    package="se.emilsjolander.stickylistheaders"
    android:versionCode="2"
    android:versionName="2.0">

    <uses-sdk
        android:minSdkVersion="7"
        android:targetSdkVersion="18" />
</manifest>

What is wrong with AndroidManifest.xml ?

I just had the same issue. I was able to fix it by opening ListViewAnimations-core-slh\\build.gradle file and add the following code inside the android section:

defaultConfig { minSdkVersion 14 }

You should try below:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    package="your.project.path">
    <uses-sdk tools:overrideLibrary="se.emilsjolander.stickylistheaders" />
</manifest>

Notice: package is your package of your project. Hope to help you!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM