在Unity 2018.3.0f2上生成密钥库密钥别名总是错误

时间:2019-01-15 17:36:46

标签: unity3d android-keystore

我正在尝试遵循如下定义的教程:

玩家设置-> Android的发布设置

  1. 按“创建新的密钥库”按钮
  2. 为您的密钥库选择目录和名称
  3. 输入密钥库密码
  4. 确认密码
  5. 点击未签名(调试键)
  6. 单击“未签名”下的“创建新的密钥选择”
  7. 创建密钥。输入该特定密钥的密码。 (不是键盘存储)
  8. 现在您将拥有一个密钥库,这听起来确实很像。它存储密钥。您创建的密钥也是其中的一部分,因为它是密钥的存储文件。
  9. 使用keytool实用程序对密钥进行签名并获取SHA-1证书,您将在应用程序的授权过程中在Google Play商店服务中插入OSHA2客户端ID作为Oauth2客户端ID。 keytool -exportcert -v -list -alias aliasname -keystore keystorefile.keystore
  10. 它将要求您在步骤7中输入的别名密码。再次输入
  11. 您将获得认证。其中将包括SHA-1证书。复制并将其粘贴到Play商店服务页面。

但是它在第7步中一直停留在此错误上。这是什么原因以及如何解决这个问题?

CommandInvokationFailure: Unable to create key in keystore. Please make sure the location and password of the keystore is correct. 
/home/asd/Unity/Hub/Editor/2018.3.0f2/Editor/Data/PlaybackEngines/AndroidPlayer/Tools/OpenJDK/Linux/bin/java -Xmx4096M -Dcom.android.sdkmanager.toolsdir="/home/asd/MEGA/go/src/android/sdk/tools" -Dfile.encoding=UTF8 -jar "/home/asd/Unity/Hub/Editor/2018.3.0f2/Editor/Data/PlaybackEngines/AndroidPlayer/Tools/sdktools.jar" -

stderr[
Exception in thread "main" java.lang.NoSuchFieldError: as_sys_sec_alg_ideaCBC
    at org.bouncycastle.jcajce.provider.symmetric.IDEA$Mappings.configure(Unknown Source)
    at org.bouncycastle.jce.provider.BouncyCastleProvider.loadAlgorithms(Unknown Source)
    at org.bouncycastle.jce.provider.BouncyCastleProvider.setup(Unknown Source)
    at org.bouncycastle.jce.provider.BouncyCastleProvider.access$000(Unknown Source)
    at org.bouncycastle.jce.provider.BouncyCastleProvider$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.bouncycastle.jce.provider.BouncyCastleProvider.<init>(Unknown Source)
    at UnityKeyToolGenKey.<clinit>(UnityKeyToolGenKey.java:25)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:348)
    at SDKMain.main(SDKMain.java:134)
]
stdout[

]
exit code: 1
UnityEditor.Android.AndroidSDKTools.RunCommand (System.String javaExe, System.String sdkToolsDir, System.String[] sdkToolCommand, System.String workingdir, System.String errorMsg, System.Int32 memoryMB) (at <e1c3953b4cf040ddb1400046b1c34897>:0)
UnityEditor.Android.AndroidSDKTools.RunCommand (UnityEditor.Android.AndroidJavaTools javaTools, System.String[] sdkToolCommand, System.String errorMsg) (at <e1c3953b4cf040ddb1400046b1c34897>:0)
UnityEditor.Android.AndroidSDKTools.CreateKey (UnityEditor.Android.AndroidJavaTools javaTools, System.String keystore, System.String storepass, System.String alias, System.String password, System.String dname, System.Int32 validityInDays) (at <e1c3953b4cf040ddb1400046b1c34897>:0)
UnityEditor.Android.AndroidKeystoreWindow.CreateKey (System.String keystore, System.String storepass) (at <e1c3953b4cf040ddb1400046b1c34897>:0)
UnityEditor.Android.AndroidKeystoreWindow.OnGUI () (at <e1c3953b4cf040ddb1400046b1c34897>:0)
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <ac823e2bb42b41bda67924a45a0173c3>:0)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <ac823e2bb42b41bda67924a45a0173c3>:0)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <ac823e2bb42b41bda67924a45a0173c3>:0)
UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at /home/builduser/buildslave/unity/build/Editor/Mono/HostView.cs:342)
UnityEditor.HostView.Invoke (System.String methodName) (at /home/builduser/buildslave/unity/build/Editor/Mono/HostView.cs:336)
UnityEditor.HostView.OldOnGUI () (at /home/builduser/buildslave/unity/build/Editor/Mono/HostView.cs:129)
UnityEngine.Experimental.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout) (at /home/builduser/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:266)
UnityEngine.Experimental.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect) (at /home/builduser/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:438)
UnityEngine.Experimental.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e) (at /home/builduser/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:421)
UnityEngine.Experimental.UIElements.IMGUIContainer.HandleEvent (UnityEngine.Experimental.UIElements.EventBase evt) (at /home/builduser/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:401)
UnityEngine.Experimental.UIElements.EventDispatcher.ProcessEvent (UnityEngine.Experimental.UIElements.EventBase evt, UnityEngine.Experimental.UIElements.IPanel panel) (at /home/builduser/buildslave/unity/build/Modules/UIElements/EventDispatcher.cs:511)
UnityEngine.Experimental.UIElements.EventDispatcher.Dispatch (UnityEngine.Experimental.UIElements.EventBase evt, UnityEngine.Experimental.UIElements.IPanel panel, UnityEngine.Experimental.UIElements.DispatchMode dispatchMode) (at /home/builduser/buildslave/unity/build/Modules/UIElements/EventDispatcher.cs:307)
UnityEngine.Experimental.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.Experimental.UIElements.EventBase e, UnityEngine.Experimental.UIElements.DispatchMode dispatchMode) (at /home/builduser/buildslave/unity/build/Modules/UIElements/Panel.cs:176)
UnityEngine.Experimental.UIElements.UIElementsUtility.DoDispatch (UnityEngine.Experimental.UIElements.BaseVisualElementPanel panel) (at /home/builduser/buildslave/unity/build/Modules/UIElements/UIElementsUtility.cs:245)
UnityEngine.Experimental.UIElements.UIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at /home/builduser/buildslave/unity/build/Modules/UIElements/UIElementsUtility.cs:68)
UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at /home/builduser/buildslave/unity/build/Modules/IMGUI/GUIUtility.cs:179)

0 个答案:

没有答案