Android Bug variant is not signed

currently selected variant is not signed. Please specify a signing configuration for this variant

1.签名配置

android{
 signingConfigs {
        release {
            keyAlias 'key0'
            keyPassword '123456'
            storeFile file('C:/Users/15082/Documents/CGL_Raspi_Android/CGLandloard/cloundlandloard.jks')
            storePassword '123456'
        }
    }
}

  1. signingConfig signingConfigs.release引用签名配置
 buildTypes {
        release {
    // proguard-android-optimize.txt
            minifyEnabled true
            shrinkResources true
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            buildConfigField "boolean", "LOG_DEBUG", "false" //不显示log
            signingConfig signingConfigs.release
        }

        debug {
            debuggable true
            minifyEnabled false
            zipAlignEnabled false
            shrinkResources false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            signingConfig signingConfigs.debug
        }
    }
点赞