Androidstudio-debug uses official signatures
- Copy the signature to the App Module. Don’t know how to create a signature? Create New in build-generate Signed Bundle Or APK
- Add the following code to the Android TAB in build.gradle
// Set the signature, Debug release signingConfigs {release {storeFile file('talon') storePassword "123" keyAlias "talon" keyPassword "123" } debug { storeFile file('talon') storePassword "123" keyAlias "talon" keyPassword "123" } }Copy the code
This signature is then referenced in the buildTypes tag
buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'Proguard-rules.pro' signingConfig signingConfigs.release} // Sets the Debug signature Debug {minifyEnabled false signingConfig signingConfigs.debug proguardFiles 'proguard-rules.pro' } }Copy the code
- The complete code is shown below
apply plugin: 'com.android.application' android { compileSdkVersion 28 defaultConfig { applicationId "com.channel.project" 19 targetSdkVersion 28 versionCode minSdkVersion 1 versionName testInstrumentationRunner "1.0" "Android. Support. The test. The runner. AndroidJUnitRunner"} / / set the signature, Debug release signingConfigs {release {storeFile file('talon') storePassword "123" keyAlias "talon" keyPassword "123" } debug { storeFile file('talon') storePassword "123" keyAlias "talon" keyPassword "123" } } buildTypes { Release {minifyEnabled false proguardFiles getDefaultProguardFile(' proGuard-android.txt '), 'Proguard-rules.pro' signingConfig signingConfigs.release} // Sets the debug signature debug {minifyEnabled false signingConfig signingConfigs.debug proguardFiles 'proguard-rules.pro' } } } dependencies { implementation fileTree(dir: 'libs', include: [' *. Jar ']) implementation 'com. Android. Support. The constraint, the constraint - layout: 1.1.3' testImplementation junit: junit: '4.12' AndroidTestImplementation 'com. Android. Support. Test: runner: 1.0.2' androidTestImplementation 'com. Android. Support. Test. Espresso: espresso - core: 3.0.2'}Copy the code