运行PEPK工具android studio时出错

时间:2017-05-21 22:02:57

标签: android android-studio google-play key

尝试运行PEPK工具时出现以下错误

C:\用户\ PRASHANT亚达夫\ AndroidStudioProjects \ PROJECT1> Java的罐子pepk.jar --keystore =密钥库--alias =键--output = encrypted_private_key_path --encryptionkey = eb10fe8f7c7c9df715022017b00c6471f8ba8170b13049a11e6c09ffe3056a104a3bbe4ac5a955f4ba4fe93fc8cef27558a3eb9d2a529a2092771fb833b656cd48b9de6a

Exception in thread "main" java.lang.UnsupportedClassVersionError: com/google/wireless/android/vending/developer/signing/tools/extern/export/ExportEncryptedPrivateKeyTool : Unsupported major.minor version 52.0
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(Unknown Source)
    at java.security.SecureClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.defineClass(Unknown Source)
    at java.net.URLClassLoader.access$100(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.net.URLClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)

2 个答案:

答案 0 :(得分:0)

我不确定为什么@MatPag评论被删除了。无论如何,将jdk升级到1.8解决了这个问题。

答案 1 :(得分:0)

我遇到了同样的问题

如果您是Windows操作系统用户,则此答案会有所帮助

  1. pepk.jar文件复制到C:\Program Files\Java\jdkx.x.x_x\bin
  2. 打开命令行到该目录,并像下面这样通过您的google命令: java -jar pepk.jar --keystore=my-upload-key.keystore --alias=my-key-alias --output=encrypted_private_key_path ....
  3. 更改您的--keystore--alias,然后运行命令