码迷,mamicode.com
首页 > 移动开发 > 详细

unity3d IL2CPP for android

时间:2019-01-22 01:20:26      阅读:363      评论:0      收藏:0      [点我收藏+]

标签:unity3   ring   arm   VID   beta   targe   const   null   except   

unity3d 使用IL2Cpp导出android工程报以下错误解决方法

重点是这块 “”System.Reflection.TargetInvocationException: ???õ???????????? --->
System.InvalidOperationException: ???????? Windows ?? FIPS ??????????????????
?? System.Security.Cryptography.MD5CryptoServiceProvider..ctor()“”

参考C#报这种错误的解决办法 

C#程序执行到运用到哈希算法或MD5算法 ,报错提示:

System.InvalidOperationException: This implementation is not part of the Windows Platform FIPS validated cryptographic algorithms.
   at System.Security.Cryptography.MD5CryptoServiceProvider..ctor()

此实现不是 Windows 平台 FIPS 验证的加密算法的一部分。 

解决方法如下:

在window中打开功能里输入regedit,回车打开注册器。然后进入如下路径中

 重点是这句 HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\FipsAlgorithmPolicy   将enable设置为0 即可。

 重点是这句 HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\FipsAlgorithmPolicy   将enable设置为0 即可。

 重点是这句 HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\FipsAlgorithmPolicy   将enable设置为0 即可。

 重点是这句 HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\FipsAlgorithmPolicy   将enable设置为0 即可。

 重点是这句 HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\FipsAlgorithmPolicy   将enable设置为0 即可。

 重点是这句 HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\FipsAlgorithmPolicy   将enable设置为0 即可。

 重点是这句 HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\FipsAlgorithmPolicy   将enable设置为0 即可。

Failed running D:\software\unity2018.1.3\Editor\Data\il2cpp/build/il2cpp.exe --convert-to-cpp --emit-null-checks --enable-array-bounds-check
--compile-cpp --libil2cpp-static --platform="Android" --architecture="ARMv7" --configuration="Release"
--outputpath="E:\u3d\ShangYe\New Unity Project (2)\Temp/StagingArea\assets\bin\Data\Native\armeabi-v7a\libil2cpp.so"
--cachedirectory="E:\u3d\ShangYe\New Unity Project (2)\Assets\..\Library\il2cpp_android_armeabi-v7a/il2cpp_cache"
--additional-include-directories="D:\software\unity2018.1.3\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\bdwgc/include"
--additional-include-directories="D:\software\unity2018.1.3\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\libil2cpp/include"
--tool-chain-path="D:/software/android-ndk-r13b"
--map-file-parser="D:\software\unity2018.1.3\Editor\Data\Tools\MapFileParser\MapFileParser.exe"
--assembly="E:\u3d\ShangYe\New Unity Project (2)\Temp\StagingArea\assets\bin\Data\Managed\Assembly-CSharp-firstpass.dll"
--assembly="E:\u3d\ShangYe\New Unity Project (2)\Temp\StagingArea\assets\bin\Data\Managed\Assembly-CSharp.dll"
--assembly="E:\u3d\ShangYe\New Unity Project (2)\Temp\StagingArea\assets\bin\Data\Managed\UnityEngine.UI.dll"
--assembly="E:\u3d\ShangYe\New Unity Project (2)\Temp\StagingArea\assets\bin\Data\Managed\UnityEngine.Analytics.dll"
--assembly="E:\u3d\ShangYe\New Unity Project (2)\Temp\StagingArea\assets\bin\Data\Managed\UnityEngine.dll"
--generatedcppdir="E:\u3d\ShangYe\New Unity Project (2)\Temp\StagingArea\Il2Cpp\il2cppOutput"

stdout:
Building libil2cpp.so with AndroidToolChain.
Output directory: E:\u3d\ShangYe\New Unity Project (2)\Temp\StagingArea\assets\bin\Data\Native\armeabi-v7a
Cache directory: E:\u3d\ShangYe\New Unity Project (2)\Library\il2cpp_android_armeabi-v7a\il2cpp_cache
il2cpp.exe didn‘t catch exception: System.Reflection.TargetInvocationException: ???õ???????????? --->
System.InvalidOperationException: ???????? Windows ?? FIPS ??????????????????
?? System.Security.Cryptography.MD5CryptoServiceProvider..ctor()
--- ??????????????β ---
?? System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
?? System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
?? System.Security.Cryptography.CryptoConfig.CreateFromName(String name, Object[] args)
?? System.Security.Cryptography.MD5.Create()
?? Unity.IL2CPP.Common.HashTools.HashOfFile(NPath path)
?? System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
?? System.String.Concat(IEnumerable`1 values)
?? Unity.IL2CPP.Building.Hashing.FileHashProvider.HashOfAllIncludableFilesInDirectory(NPath directory)
?? Unity.IL2CPP.Building.Hashing.FileHashProvider.Initialize(IEnumerable`1 cppSourceCompileInstructions)
?? Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics)
?? Unity.IL2CPP.Building.Statistics.BuildingTestRunnerHelper.BuildAndLogStatsForTestRunner(CppProgramBuilder builder, IBuildStatistics& statistics)
?? il2cpp.Program.DoRun(String[] args)
?? il2cpp.Program.Run(String[] args)
?? il2cpp.Program.Main(String[] args)
stderr:

δ??????????: System.Reflection.TargetInvocationException: ???õ???????????? ---> System.InvalidOperationException: ???????? Windows ?? FIPS ??????????????????
?? System.Security.Cryptography.MD5CryptoServiceProvider..ctor()
--- ??????????????β ---
?? System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
?? System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
?? System.Security.Cryptography.CryptoConfig.CreateFromName(String name, Object[] args)
?? System.Security.Cryptography.MD5.Create()
?? Unity.IL2CPP.Common.HashTools.HashOfFile(NPath path)
?? System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
?? System.String.Concat(IEnumerable`1 values)
?? Unity.IL2CPP.Building.Hashing.FileHashProvider.HashOfAllIncludableFilesInDirectory(NPath directory)
?? Unity.IL2CPP.Building.Hashing.FileHashProvider.Initialize(IEnumerable`1 cppSourceCompileInstructions)
?? Unity.IL2CPP.Building.CppProgramBuilder.Build(IBuildStatistics& statistics)
?? Unity.IL2CPP.Building.Statistics.BuildingTestRunnerHelper.BuildAndLogStatsForTestRunner(CppProgramBuilder builder, IBuildStatistics& statistics)
?? il2cpp.Program.DoRun(String[] args)
?? il2cpp.Program.Run(String[] args)
?? il2cpp.Program.Main(String[] args)

unity3d IL2CPP for android

标签:unity3   ring   arm   VID   beta   targe   const   null   except   

原文地址:https://www.cnblogs.com/U-tansuo/p/IL2CPP_Unity3d.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!