Android - 错误清单合并失败

时间:2016-01-15 03:51:06

标签: java android android-layout android-activity android-manifest

我只是从CodeCanyon下载Android Material(Project Files),但是当打开并使用Android Studio构建时,我收到此错误:

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

此Android Material Project包含许多模块,其中一个导致错误的是 StickListHeaders ,这里是 StickListHeaders 模块的AndroidManifest.xml:< / p>

<?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>

AndroidManifest.xml有什么问题?

2 个答案:

答案 0 :(得分:1)

我遇到了同样的问题。我可以通过打开ListViewAnimations-core-slh\build.gradle文件并在android部分中添加以下代码来修复它:

defaultConfig { minSdkVersion 14 }

答案 1 :(得分:0)

你应该尝试以下:

<?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>

注意:package是您项目的包。希望能帮到你!