Android Studio - Gradle Manifest Merging Failed

前端 未结 4 865
长发绾君心
长发绾君心 2021-02-04 07:19

I am building a demo app using actionbar sherlock in android studio and i was facing problem , mentioned in following link :- Previous Problem

now after following the re

相关标签:
4条回答
  • 2021-02-04 07:22

    That works for me.
    My library project AndroidManifest.xml miss a application element
    add one will fix it.

    <application
        android:allowBackup="true"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
    </application>
    

    I use gradle clean projectName --info get the error information, and solve it.

    0 讨论(0)
  • 2021-02-04 07:32

    For what I can see, if you have a multi-module project with Android Studio and gradle, the IDE try to merge manifest files from every module into a Main manifest.

    If you have a module A and a module B, and in the A manifest you declare some activity from B module, gradle will enconter a issue when merging.

    Try removing cross-module reference in manifest files.

    0 讨论(0)
  • 2021-02-04 07:44

    That worked for me when adding the Google Play Services

    android {
        compileSdkVersion 17
        buildToolsVersion "17.0.0"
    
        defaultConfig {
            minSdkVersion 10
            targetSdkVersion 16
        }
    }
    
    0 讨论(0)
  • 2021-02-04 07:47

    Make sure that in all your build.gradle scripts the minSdkVersion and targetSdkVersion correspond to those you have in your manifests:

    android {
        defaultConfig { 
           minSdkVersion 10
           targetSdkVersion 16
        }
    }
    

    This worked for me, I hope it does the trick for you, cheers.

    0 讨论(0)
提交回复
热议问题