美文网首页
Error:Plugin with id 'com.github

Error:Plugin with id 'com.github

作者: 凉风入梦 | 来源:发表于2018-01-19 14:55 被阅读0次

导入第三方库的时候出现问题

Error:Plugin with id 'com.github.dcendents.android-maven' not found.

这是原因为该项目的原作者会把项目发布到maven中央仓库中,所以在gradle中添加了相关的maven发布任务。
咱们又不能连到maven的仓库.

解决办法:

将第三方项目中的apply plugin: 'com.android.library'保留,android{},dependencies{}中的内容保留,其余的直接删除即可.例如我导入的highlight项目:

apply plugin: 'com.android.library'

android {
    compileSdkVersion 24
    buildToolsVersion '26.0.2'

    defaultConfig {
        minSdkVersion 10
        targetSdkVersion 24
        versionCode 15
        versionName "1.8.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }

        signingConfigs{
            debug{
                storeFile file('debug.keystore')
                storePassword "android"
                keyAlias "androiddebugkey"
                keyPassword "android"
            }
        }
    }
}


//ext {
//    bintrayRepo = 'maven'
//    bintrayName = 'Highlight'
//    publishedGroupId = 'com.isanwenyu.highlight'
//    libraryName = 'Highlight'
//    artifact = 'highlight'
//    libraryDescription = 'One for Android app highlights the directivity function of library'
//    siteUrl = 'https://github.com/isanwenyu/Highlight'
//    gitUrl = 'https://github.com/isanwenyu/Highlight.git'
//    libraryVersion = '1.8.0'
//    developerId = 'isanwenyu'
//    developerName = 'isanwenyu'
//    developerEmail = 'isanwenyu@163.com'
//    licenseName = 'The Apache Software License, Version 2.0'
//    licenseUrl = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
//    allLicenses = ["Apache-2.0"]
//}
//
//apply from: 'https://raw.githubusercontent.com/isanwenyu/BintrayUploadGradle/master/bintray_upload.gradle'

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    compile 'com.android.support:support-core-ui:24.2.0'
}

相关文章

网友评论

      本文标题:Error:Plugin with id 'com.github

      本文链接:https://www.haomeiwen.com/subject/jwwooxtx.html