记录:Unity 手动配置 V1 V2签名问题

2020-10-27  本文已影响0人  她声音清澈丶


配置V1 V2签名原帖子: unity android V1签名

遇到的问题:Unity从5.6.6升级到Unity2018.4.7,检测到进行V1 V2 签名的话,有的渠道不能通过(2018的Unity版本默认会进行V1 V2签名)

链接地址帖子中 mainTemplate.gradle配置

当我按照帖子中的配置复制过来(其中的XXX替换成本工程的参数),会报这些错:

CommandInvokationFailure: Gradle build failed. C:\Program Files\Java\jdk1.8.0_25\bin\java.exe -classpath "F:\Program Files\Unity2018.4.7\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-5.1.1.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "assembleRelease"stderr[FAILURE: Build failed with an exception.* Where:Build file 'F:\Fish_Main2018\Temp\gradleOut\build.gradle' line: 43* What went wrong:A problem occurred evaluating root project 'gradleOut'.> Could not find method storerile() for arguments [F:\Fish_Main2018\Temp\gradleOut\Tuoyou.keystore] on SigningConfig_Decorated{name=release, storeFile=null, storePassword=null, keyAlias=popfishing, keyPassword=tuoyou123, storeType=jks, v1SigningEnabled=true, v2SigningEnabled=true} of type com.android.build.gradle.internal.dsl.SigningConfig.* Try:Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.* Get more help at https://help.gradle.orgBUILD FAILED in 6s]stdout[]exit code: 1 at UnityEditor.Android.Command.WaitForProgramToRun (UnityEditor.Utils.Program p, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) [0x00031] in <62f761e6ab1445a38cdcb4ac36512695>:0 at UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) [0x00015] in <62f761e6ab1445a38cdcb4ac36512695>:0 at UnityEditor.Android.Command.Run (System.String command, System.String args, System.String workingdir, UnityEditor.Android.Command+WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg) [0x0000a] in <62f761e6ab1445a38cdcb4ac36512695>:0 at UnityEditor.Android.AndroidJavaTools.RunJava (System.String args, System.String workingdir, System.Action`1[T] progress, System.String error) [0x0001f] in <62f761e6ab1445a38cdcb4ac36512695>:0 at UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, System.String workingdir, System.String task, System.Action`1[T] progress) [0x00029] in <62f761e6ab1445a38cdcb4ac36512695>:0 Rethrow as GradleInvokationException: Gradle build failed at UnityEditor.Android.GradleWrapper.Run (UnityEditor.Android.AndroidJavaTools javaTools, System.String workingdir, System.String task, System.Action`1[T] progress) [0x0004d] in <62f761e6ab1445a38cdcb4ac36512695>:0 at UnityEditor.Android.PostProcessor.Tasks.BuildGradleProject.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context) [0x000a8] in <62f761e6ab1445a38cdcb4ac36512695>:0 at UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context) [0x00074] in <62f761e6ab1445a38cdcb4ac36512695>:0 UnityEditor.BuildPipeline:BuildPlayerInternalNoCheck(String[], String, String, BuildTargetGroup, BuildTarget, BuildOptions, Boolean)UnityEditor.DefaultBuildMethods:BuildPlayer(BuildPlayerOptions) (at C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:173)UnityEditor.BuildPlayerWindow:CallBuildMethods(Boolean, BuildOptions) (at C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindowBuildMethods.cs:97)UnityEditor.BuildPlayerWindow:GUIBuildButtons(IBuildWindowExtension, Boolean, Boolean, Boolean, BuildPlatform) (at C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindow.cs:907)UnityEditor.BuildPlayerWindow:ShowBuildTargetSettings() (at C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindow.cs:807)UnityEditor.BuildPlayerWindow:OnGUI() (at C:\buildslave\unity\build\Editor\Mono\BuildPlayerWindow.cs:410)System.Reflection.MonoMethod:InternalInvoke(Object, Object[], Exception&)System.Reflection.MonoMethod:Invoke(Object, BindingFlags, Binder, Object[], CultureInfo)System.Reflection.MethodBase:Invoke(Object, Object[])UnityEditor.HostView:Invoke(String, Object) (at C:\buildslave\unity\build\Editor\Mono\HostView.cs:342)UnityEditor.HostView:Invoke(String) (at C:\buildslave\unity\build\Editor\Mono\HostView.cs:336)UnityEditor.HostView:OldOnGUI() (at C:\buildslave\unity\build\Editor\Mono\HostView.cs:129)UnityEngine.Experimental.UIElements.IMGUIContainer:DoOnGUI(Event, Matrix4x4, Rect, Boolean) (at C:\buildslave\unity\build\Modules\UIElements\IMGUIContainer.cs:244)UnityEngine.Experimental.UIElements.IMGUIContainer:HandleIMGUIEvent(Event, Matrix4x4, Rect) (at C:\buildslave\unity\build\Modules\UIElements\IMGUIContainer.cs:438)UnityEngine.Experimental.UIElements.IMGUIContainer:HandleIMGUIEvent(Event) (at C:\buildslave\unity\build\Modules\UIElements\IMGUIContainer.cs:421)UnityEngine.Experimental.UIElements.IMGUIContainer:HandleEvent(EventBase) (at C:\buildslave\unity\build\Modules\UIElements\IMGUIContainer.cs:401)UnityEngine.Experimental.UIElements.EventDispatcher:ProcessEvent(EventBase, IPanel) (at C:\buildslave\unity\build\Modules\UIElements\EventDispatcher.cs:511)UnityEngine.Experimental.UIElements.EventDispatcher:Dispatch(EventBase, IPanel, DispatchMode) (at C:\buildslave\unity\build\Modules\UIElements\EventDispatcher.cs:307)UnityEngine.Experimental.UIElements.BaseVisualElementPanel:SendEvent(EventBase, DispatchMode) (at C:\buildslave\unity\build\Modules\UIElements\Panel.cs:176)UnityEngine.Experimental.UIElements.UIElementsUtility:DoDispatch(BaseVisualElementPanel) (at C:\buildslave\unity\build\Modules\UIElements\UIElementsUtility.cs:245)UnityEngine.Experimental.UIElements.UIElementsUtility:ProcessEvent(Int32, IntPtr) (at C:\buildslave\unity\build\Modules\UIElements\UIElementsUtility.cs:68)UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr) (at C:\buildslave\unity\build\Modules\IMGUI\GUIUtility.cs:179)

然后我把关于keystore的配置都删除了,我觉得打包时候,都会在Player Setting中选择和设置了keystore,这里感觉应该不用设置了,然后打包成功了...

删除后 检测结果
上一篇下一篇

猜你喜欢

热点阅读