Androidstudio will give the default buildtype for the debug package signature, so you can run the install APK directly to the phone, if we add the BuildType (such as User,eng), then the direct operation will say no signature, not installed.
Signature steps:
In the directory where you need to save the signature file (for example, to sign the test project, you will normally go to the build-apk in the test directory)
Run:
keytool-genkey-alias user_key. Keystore-keyalg rsa-validity 20000 -keystore userkey. KeyStore
(where User_key is your custom file name, 20000 is the expiration date)
After running, "program Keytool" may appear in the following packages: Gcj-4.6-jre-headless,......
Then run the sudo apt-get install GCJ first-......
Enter key Store password:android (password, not less than 6 digits)
Enter Key password for <user_key.keystore>:android (password, I was casually written)
Common name:android
(I've all entered Android)
When you are done, the Userkey.keystore is generated under BUILD-APK (your custom directory).
Android Studio Signature