1、在build.gradle中android下添加keystore位置signingConfigs
如:
apply plugin: 'com.android.application'android {signingConfigs {config {keyAlias 'key0'keyPassword '123567'storeFile file('E:\\521copy\\Myditukaifa\\keystore\\mybdkeystore.jks')//这里是你的jks文件路径storePassword '123567'}}compileSdkVersion 27useLibrary 'org.apache.http.legacy'
2、在build.gradle中buildTypes下添加debug位置
如:
buildTypes {release {minifyEnabled false
// shrinkResources falseproguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'}debug {signingConfig signingConfigs.config}
// debug {
// minifyEnabled false
// shrinkResources false
// proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
// }}