Maven 错误';java';插件已经应用,但它与Android插件不兼容

Maven 错误';java';插件已经应用,但它与Android插件不兼容,maven,android-studio,android-gradle-plugin,build.gradle,jcenter,Maven,Android Studio,Android Gradle Plugin,Build.gradle,Jcenter,我正在用android做一个图书馆项目。我想将我的库上载到JCenter。我已经创建了bintray帐户等,并遵循了上面提到的所有步骤 我在我的应用程序模块和库模块中做了以下更改 应用程序模块build.gradle 库模块build.gradle 最新项目root build.gradle 当我在建筑的时候,我得到了这个错误 我花了两天时间在同一个问题上,但没有得到适当的解决办法。请建议如何解决它 错误 外接程序根build.gradle apply plugin: 'com.jfrog.bi

我正在用android做一个图书馆项目。我想将我的库上载到JCenter。我已经创建了bintray帐户等,并遵循了上面提到的所有步骤

我在我的应用程序模块和库模块中做了以下更改

应用程序模块build.gradle 库模块build.gradle 最新项目root build.gradle 当我在建筑的时候,我得到了这个错误 我花了两天时间在同一个问题上,但没有得到适当的解决办法。请建议如何解决它

错误
外接程序根build.gradle

apply plugin: 'com.jfrog.bintray'

看看这篇精彩的入门文章

嗨,彭拉德,我正在关注你在上面评论中提到的教程。我再一次陷入困境:得到错误:-错误:(1,0)未找到id为'com.android.application'的插件。嗨,彭拉德,我发布了最新的Build.gradle。请查收!!'找不到com.android.application-如果我放置dependencies标记===========dependencies{classpath'com.android.tools.build:gradle:1.1.3'},则已解决此错误但再次出现错误:-错误:“java”插件已应用,但与Android插件不兼容。嘿,彭拉德,我有一个新问题,需要你的帮助,请检查下面链接的plz:[链接]()
apply plugin: 'com.android.library'

ext {
    bintrayRepo = 'maven'
    bintrayName = 'test-sdk'

    publishedGroupId = 'in.test.sdk'
    libraryName = 'testlib'
    artifact = 'test-sdk'

    libraryDescription = 'A wrapper for Facebook Native Like Button (LikeView) on Android'

    siteUrl = 'https://github.com/xyz/testsdk'
    gitUrl = 'https://github.com/xyz/testsdk.git'

    libraryVersion = '1.0.0'

    developerId = 'xyz'
    developerName = 'xyz'
    developerEmail = 'xyz@xyz.xyz'

    licenseName = 'The Apache Software License, Version 2.0'
    licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
    allLicenses = ["Apache-2.0"]
}

version = "1.0.0"
android {
    compileSdkVersion 22
    buildToolsVersion "22.0.1"

    defaultConfig {
        minSdkVersion 8
        targetSdkVersion 22
        compileOptions {
            sourceCompatibility JavaVersion.VERSION_1_7
            targetCompatibility JavaVersion.VERSION_1_7
        }
    }

    buildTypes {
        release {
            minifyEnabled false

            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
           // proguardFiles 'proguard-project.txt'
        }
        packagingOptions {
            exclude 'META-INF/LICENSE.txt'
        }
    }


}

dependencies {
    compile 'com.android.support:support-v4:22.2.0'
    compile files('libs/gson-2.3.1.jar')
    compile files('libs/android-query-full.0.26.8.jar')
    compile files('libs/httpmime-4.1.1.jar')
    compile files('libs/jackson-annotations-2.5.0.jar')
    compile files('libs/javax.annotation.jar')
    compile files('libs/libGoogleAnalyticsServices.jar')
    compile files('libs/okhttp-2.3.0.jar')
    compile files('libs/okio-1.3.0.jar')
    compile files('libs/retrofit-1.9.0.jar')
}
  // Top-level build file where you can add configuration options common to all sub-projects/modules.

    buildscript {
        repositories {
            jcenter()
        }
     dependencies {
        classpath 'com.android.tools.build:gradle:1.1.3'
        classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.3.1'
        classpath 'com.github.dcendents:android-maven-plugin:1.2'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }

    }

    plugins {
        id "com.jfrog.bintray" version "1.2"
    }

    allprojects {

        repositories {
            jcenter()
        }

        apply plugin: 'maven'
        apply plugin: 'maven-publish'
        apply plugin: 'java'
    }
    publishing {
        publications {
            MyPublication(MavenPublication) {
                from components.java
                groupId 'in.freeb.sdk'
                artifactId 'freeb-sdk'
                version '1.0'
            }
        }
    }

    bintray {
        user = 'ajay-spice'
        key = '31317855920db8f7bc27f97730a8e9f99b6f707e'
        publications = ['MyPublication']
        pkg {
            repo = 'maven'
            name = 'freeb-sdk'
            userOrg = 'ajay-spice'
            licenses = ['Apache-2.0']
            vcsUrl = 'https://github.com/ajay-spice/freebsdk.git'
            labels = ['gear', 'gore', 'gorilla']
            publicDownloadNumbers = true
            attributes= ['a': ['ay1', 'ay2'], 'b': ['bee'], c: 'cee'] //Optional package-level attributes
            version {
                name = '1.0-Final'
                desc = 'FreeB 1.0 final'
                vcsTag = '1.0.0'
                attributes = ['freeb-sdk': 'in.freeb.sdk']
            }
        }
    }

    task wrapper(type: Wrapper) {
        gradleVersion = '2.4'
    }
Error:The 'java' plugin has been applied, but it is not compatible with the Android plugins.
Gradle 'FreeBApp' project refresh failed
apply plugin: 'com.jfrog.bintray'