In Android studio, to do Sina, such as the need to sign to use the three-way function, test sharing content is particularly troublesome. So in the project with the directory, add your own Keysotre file. And the signature is configured in Gradle.
There are two ways to introduce a signature file in Android Studio.
-
Build->generate signed APK. Then always next, will encounter let you specify the key store path (1), specify and enter the password, always next until finish starts packing.
-
Add in Gradle, will signingconfigs perfect, specify the corresponding file, password, etc. in release, and need to specify Signingconfig android.signingConfigs.release in Buildtypes. Finally, under the app root directory
./gradlew Build
After successful execution, the debug package and release package are->build->outputs->apk under the app directory.
signingconfigs { release { storefile file (Key_store) storepassword key_ store_password keyalias key_alias keypassword key_alias_password }
buildtypes { debug { minifyEnabled true Proguardfiles getdefaultproguardfile (' proguard-android.txt '), ' Proguard-project.txt ' } release { Signingconfig android.signingconfigs.release minifyenabled true proguardfiles getdefaultproguardfile (' Proguard-android.txt '), ' Proguard-project.txt ' }}
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
How does android studio introduce signature files