其他分享
首页 > 其他分享> > Gradle Error:Android Studio,ActionbarSherlock和SlidingMenu

Gradle Error:Android Studio,ActionbarSherlock和SlidingMenu

作者:互联网

我已经在这几天试图在Android Studio中使库结构正确.我会继续使用Eclipse,但性能明智,最近对我来说真的很糟糕.请非常感谢任何指导,因为找到的所有解决方案都没有起作用,文档也没有任何结果.

除主TestProject外,所有清单都有一个空的应用程序标记.

编辑*在包含SlidingMenu之前,我确实让ActionBarSherlock正常工作,没有问题和构建等.

错误

Gradle: Execution failed for task ':libraries:SlidingMenu:processReleaseManifest'.
> Manifest merging failed. See console for more info.

Build.Gradle(SlidingMenu)

apply plugin: 'android-library'

buildscript {
   repositories {
      mavenCentral()
}

  dependencies {
    classpath 'com.android.tools.build:gradle:0.5.+'
  }
}

dependencies {
        compile 'com.android.support:support-v4:13.0.+'
        compile project(':libraries:actionbarsherlock')
    }

android {
    compileSdkVersion 17
    buildToolsVersion '17.0.0'


sourceSets {
    main {
        manifest.srcFile 'AndroidManifest.xml'
        java.srcDirs = ['src']
        resources.srcDirs = ['src']
        aild.srcDirs = ['src']
        renderscript.srcDirs = ['src']
        res.srcDirs = ['res']
        assets.srcDirs = ['assets']
        }
    }
}

Build.Gradle(ActionBarSherlock)

apply plugin: 'android-library'

buildscript {
    repositories {
        mavenCentral()
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:0.5.+'
    }
}

dependencies {
    compile 'com.android.support:support-v4:13.0.+'
}

android {
    compileSdkVersion 17
    buildToolsVersion '17.0.0'

    sourceSets {
        main {
            manifest.srcFile 'AndroidManifest.xml'
            java.srcDirs = ['src']
            resources.srcDirs = ['src']
            aild.srcDirs = ['src']
            renderscript.srcDirs = ['src']
            res.srcDirs = ['res']
            assets.srcDirs = ['assets']
        }
    }
}

Build.Gradle(测试项目)

buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:0.5.+'
    }
}
apply plugin: 'android'

repositories {
    mavenCentral()
}

dependencies {
    compile 'com.android.support:support-v4:13.0.+'
    compile project(':libraries:actionbarsherlock')
    compile project(':libraries:SlidingMenu')
}

android {
    compileSdkVersion 17
    buildToolsVersion "17.0.0"

    defaultConfig {
        minSdkVersion 7
        targetSdkVersion 16
    }
}

settings.gradle(测试项目)

include ':TestProject',':libraries:actionbarsherlock',':libraries:SlidingMenu'

解决方法:

不幸的是,这可能由于很多原因而发生.我建议从命令行运行gradle build -info,看看它是否能为您提供更多信息.

我遇到的常见合并失败是minSdkVersions发生冲突时.我看到你的测试项目minSdkVersion是7,是ActionBarSherlock和SlidingMenu中声明的最低级别是7或更少吗?

标签:android,android-studio,gradle,actionbarsherlock,slidingmenu
来源: https://codeday.me/bug/20190714/1460383.html