jjzjj

android - StorageServiceAccountSample 应用程序报告 "KeyStore JKS implementation not found"

coder 2023-11-22 原文

StorageServiceAccountSample 的第一行

HTTP_TRANSPORT = GoogleNetHttpTransport.newTrustedTransport();

导致“找不到 KeyStore JKS 实现”:

W/System.err(20142): java.security.KeyStoreException: java.security.NoSuchAlgorithmException: KeyStore JKS implementation not found
W/System.err(20142):    at java.security.KeyStore.getInstance(KeyStore.java:119)
W/System.err(20142):    at com.google.api.client.util.SecurityUtils.getJavaKeyStore(SecurityUtils.java:48)
W/System.err(20142):    at com.google.api.client.googleapis.GoogleUtils.getCertificateTrustStore(GoogleUtils.java:74)
W/System.err(20142):    at com.google.api.client.googleapis.javanet.GoogleNetHttpTransport.newTrustedTransport(GoogleNetHttpTransport.java:55)

据我所知,Android 不支持 JKS,我应该如何修改此方法来解决它?

最佳答案

已替换

HTTP_TRANSPORT = GoogleNetHttpTransport.newTrustedTransport();

HTTP_TRANSPORT = AndroidHttp.newCompatibleTransport();

然后问题就解决了。

关于android - StorageServiceAccountSample 应用程序报告 "KeyStore JKS implementation not found",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18862779/

有关android - StorageServiceAccountSample 应用程序报告 "KeyStore JKS implementation not found"的更多相关文章

随机推荐