由于第三方库无法签署 APK

Can't sign APK because of third party library

这是我发布的第一篇应用程序。该项目在开发方面运行良好,但我在签署 APK 期间遇到问题。

com.1gravity:android-contactpicker

的应用程序中包含库

仅在签署 apk 期间遇到问题。

错误即将到来

Error:(30, 44) error: package com.onegravity.contactpicker.contact does not exist

Generate Signed APK: Errors while building APK. You can find the errors in the 'Messages' view.

gradle 文件

apply plugin: 'com.android.application'

android {
    compileSdkVersion 25
    buildToolsVersion "26.0.0"
    defaultConfig {
        applicationId 'com.mymatatu'
        minSdkVersion 15
        targetSdkVersion 25
        versionCode 3
        versionName "1.3"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }

    productFlavors {
    }
}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    debugCompile project(':library')
    compile 'com.android.support:appcompat-v7:25.3.1'
    compile 'com.android.support.constraint:constraint-layout:1.0.2'
    compile 'com.android.volley:volley:1.0.0'
    compile 'com.android.support:design:25.3.1'
    compile 'com.android.support:support-v4:25.3.1'
    compile 'com.android.support:cardview-v7:25.3.1'
    compile 'com.android.support:recyclerview-v7:25.3.1'
    compile 'com.github.bumptech.glide:glide:4.0.0-RC1'
    compile 'com.github.markushi:circlebutton:1.1'
    testCompile 'junit:junit:4.12'
    annotationProcessor 'com.github.bumptech.glide:compiler:4.0.0-RC1'
}

在您的 gradle 文件中更改此

debugCompile project(':library') 

行进入

compile project(':library')