无法再生成已签名的Android App Bundle或APK(Android Studio)

时间:2019-07-09 16:10:01

标签: android android-studio apk android-app-bundle

我搜索的范围很广,没有任何分辨率。我相信我使用了正确的别名和密码,以为有两个密码。当我输入错误的密码时,我会收到有关密钥库被篡改或输入错误密码的不同错误;当我输入正确的密码时,我会收到关于无法从存储库中检索到密钥的错误。假设两个密码相同,我可以确保别名和密钥库密码以及密钥密码都是正确的。我将近两年没有生成APK,此后Android Studio有所改变。除非创建新的密钥库(不需要),否则无法生成APK或新的AAB文件。这是我尝试创建AAB时出现的错误:

Something went wrong with the encryption tool

java.security.UnrecoverableKeyException: Cannot recover key
    at sun.security.provider.KeyProtector.recover(KeyProtector.java:328)
    at sun.security.provider.JavaKeyStore.engineGetKey(JavaKeyStore.java:146)
    at sun.security.provider.JavaKeyStore$JKS.engineGetKey(JavaKeyStore.java:56)
    at sun.security.provider.KeyStoreDelegator.engineGetKey(KeyStoreDelegator.java:96)
    at sun.security.provider.JavaKeyStore$DualFormatJKS.engineGetKey(JavaKeyStore.java:70)
    at java.security.KeyStore.getKey(KeyStore.java:1023)
    at com.google.wireless.android.vending.developer.signing.tools.extern.export.KeystoreHelper.extractPrivateKey(KeystoreHelper.java:56)
    at com.google.wireless.android.vending.developer.signing.tools.extern.export.KeystoreHelper.getPrivateKey(KeystoreHelper.java:35)
    at com.google.wireless.android.vending.developer.signing.tools.extern.export.ExportEncryptedPrivateKeyTool.run(ExportEncryptedPrivateKeyTool.java:98)
    at org.jetbrains.android.exportSignedPackage.ExportSignedPackageWizard$2.run(ExportSignedPackageWizard.java:232)
    at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:727)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:164)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:582)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:532)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:87)
    at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:151)
    at com.intellij.openapi.progress.impl.CoreProgressManager$4.run(CoreProgressManager.java:403)
    at com.intellij.openapi.application.impl.ApplicationImpl$1.run(ApplicationImpl.java:314)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)

我已经检查了密钥库的内容以验证别名正确,并且还检查了taskArtifacts.bin以确保输入正确的密码。如果有区别的话,我会有密钥库哈希。

不确定是否有帮助,但是当我在AS的Android控制台上尝试使用keytool时,这两种方法都不起作用。关于非法选择的内容。

非常感谢。

0 个答案:

没有答案