GoogleAdMob插件Unity。解决Android依赖关系。 InvalidOperationException:StandardIn尚未重定向

时间:2019-01-25 02:18:31

标签: java c# android unity3d sdk

我正在使用Unity 2018.3.0f2,并且在安装Google Mobile Ads Unity插件v3.15.1的过程中,出现了一个空的cmd提示,并且出现了“正在解决Android依赖关系”窗口,该窗口冻结并出现错误

InvalidOperationException: StandardIn has not been redirected. 
System.Diagnostics.Process.get_StandardInput () (at <3845a180c26b4889bc2d47593a665814>:0)

显示在控制台中。

我已经找到了解决此问题的方法,但是没有一个人提到这个StandardIn。

这是显示的完整错误:

InvalidOperationException: StandardIn has not been redirected.
System.Diagnostics.Process.get_StandardInput () (at <3845a180c26b4889bc2d47593a665814>:0)
(wrapper remoting-invoke-with-check) System.Diagnostics.Process.get_StandardInput()
GooglePlayServices.CommandLine.RunViaShell (System.String toolPath, System.String arguments, System.String workingDirectory, System.Collections.Generic.Dictionary`2[TKey,TValue] envVars, GooglePlayServices.CommandLine+IOHandler ioHandler, System.Boolean useShellExecution, System.Boolean stdoutRedirectionInShellMode) (at <0ea28fee5338451fbecc93319b91e068>:0)
GooglePlayServices.CommandLine.Run (System.String toolPath, System.String arguments, System.String workingDirectory, System.Collections.Generic.Dictionary`2[TKey,TValue] envVars, GooglePlayServices.CommandLine+IOHandler ioHandler) (at <0ea28fee5338451fbecc93319b91e068>:0)
GooglePlayServices.CommandLine+<RunAsync>c__AnonStorey1.<>m__0 () (at <0ea28fee5338451fbecc93319b91e068>:0)
System.Threading.ThreadHelper.ThreadStart_Context (System.Object state) (at <ac823e2bb42b41bda67924a45a0173c3>:0)
System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) (at <ac823e2bb42b41bda67924a45a0173c3>:0)
System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state, System.Boolean preserveSyncCtx) (at <ac823e2bb42b41bda67924a45a0173c3>:0)
System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext executionContext, System.Threading.ContextCallback callback, System.Object state) (at <ac823e2bb42b41bda67924a45a0173c3>:0)
System.Threading.ThreadHelper.ThreadStart () (at <ac823e2bb42b41bda67924a45a0173c3>:0)
UnityEngine.UnhandledExceptionHandler:<RegisterUECatcher>m__0(Object, UnhandledExceptionEventArgs)

如果有人有任何很棒的建议。谢谢!

1 个答案:

答案 0 :(得分:0)

听起来有些奇怪,但是我已通过从Unity项目文件夹名称中删除所有标点符号来解决,在我的情况下,这是一个单引号。

还要确保已将路径设置为jdk,jre和JAVA_HOME。

希望有帮助!