android studio 配置签名

为什么80%的码农都做不了架构师?>>>   hot3.png

在app目录下创建key文件夹将jks文件放进去

apply plugin: 'com.android.application'

android {
    compileSdkVersion 26
    buildToolsVersion "27.0.3"
    defaultConfig {
        applicationId "com.fnf.executor"
        minSdkVersion 19
        targetSdkVersion 26
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    signingConfigs {
        main {
            storeFile file("./key/platform.jks") //签名文件路径
            storePassword "huld123"
            keyAlias "huld"
            keyPassword "huld123"
        }
    }
    buildTypes {
//        release {
//            minifyEnabled false
//            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
//        }
        release {
            minifyEnabled false
            signingConfig signingConfigs.main //添加这一行
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
        debug {
            minifyEnabled false
            signingConfig signingConfigs.main //添加这一行
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    compile 'com.android.support:appcompat-v7:26.+'
}

 

转载于:https://my.oschina.net/wfy94/blog/1808981

你可能感兴趣的:(android studio 配置签名)