可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
I was in the in the process of singing my apk for my release and i forgot keystorepassword so i clicked reset. then I got this error.
Error:Execution failed for task ':app:packageRelease'.
com.android.ide.common.signing.KeytoolException: Failed to read key "app name" key from store "C:\keystore\keystore.jks": Keystore was tampered with, or password was incorrect
What is my best way to fix this?
回答1:
If you forgot your password, there is no way to fix this. If your application is not published to the playstore, you are free to change the sign-in cert to a new one. Otherwise you will not be able to update your app at playstore, you have to unpublish your current app, change the package name and publish a new one with a different key and package. So always try keep a backup of your cert file and password.
回答2:
On Windows, I found the keystore file path, password, key alias and key password in an earlier log report before I updated Android Studio. From windows file explorer c:/Users/your pc name/.AndroidStudio2.0 (your android studio version)\system\log\idea.log.1 (or any old log number) Then I searched for “password” and found this from an earlier date: -Pandroid.injected.signing.store.file= path to your keystore -Pandroid.injected.signing.store.password= KEYSTORE PASSWORD -Pandroid.injected.signing.key.alias= KEY ALIAS -Pandroid.injected.signing.key.password= YOUR_KEY_PASSWORD