unity3d IL2CPP for android

五陵年少金市东,银鞍白马渡春风。这篇文章主要讲述unity3d IL2CPP for android相关的知识,希望能为你提供帮助。
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_MACHINESYSTEMCurrentControlSetControlLsaFipsAlgorithmPolicy     将enable设置为0 即可。
  重点是这句 HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlLsaFipsAlgorithmPolicy     将enable设置为0 即可。
  重点是这句 HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlLsaFipsAlgorithmPolicy     将enable设置为0 即可。
  重点是这句 HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlLsaFipsAlgorithmPolicy     将enable设置为0 即可。
  重点是这句 HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlLsaFipsAlgorithmPolicy     将enable设置为0 即可。
  重点是这句 HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlLsaFipsAlgorithmPolicy     将enable设置为0 即可。
  重点是这句 HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlLsaFipsAlgorithmPolicy     将enable设置为0 即可。
Failed running D:softwareunity2018.1.3EditorDatail2cpp/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:u3dShangYeNew Unity Project (2)Temp/StagingAreaassetsinDataNativearmeabi-v7alibil2cpp.so"
--cachedirectory="E:u3dShangYeNew Unity Project (2)Assets..Libraryil2cpp_android_armeabi-v7a/il2cpp_cache"
--additional-include-directories="D:softwareunity2018.1.3EditorDataPlaybackEnginesAndroidPlayer/Toolsdwgc/include"
--additional-include-directories="D:softwareunity2018.1.3EditorDataPlaybackEnginesAndroidPlayer/Toolslibil2cpp/include"
--tool-chain-path="D:/software/android-ndk-r13b"
--map-file-parser="D:softwareunity2018.1.3EditorDataToolsMapFileParserMapFileParser.exe"
--assembly="E:u3dShangYeNew Unity Project (2)TempStagingAreaassetsinDataManagedAssembly-CSharp-firstpass.dll"
--assembly="E:u3dShangYeNew Unity Project (2)TempStagingAreaassetsinDataManagedAssembly-CSharp.dll"
--assembly="E:u3dShangYeNew Unity Project (2)TempStagingAreaassetsinDataManagedUnityEngine.UI.dll"
--assembly="E:u3dShangYeNew Unity Project (2)TempStagingAreaassetsinDataManagedUnityEngine.Analytics.dll"
--assembly="E:u3dShangYeNew Unity Project (2)TempStagingAreaassetsinDataManagedUnityEngine.dll"
--generatedcppdir="E:u3dShangYeNew Unity Project (2)TempStagingAreaIl2Cppil2cppOutput"
stdout:
Building libil2cpp.so with AndroidToolChain.
Output directory: E:u3dShangYeNew Unity Project (2)TempStagingAreaassetsinDataNativearmeabi-v7a
Cache directory: E:u3dShangYeNew Unity Project (2)Libraryil2cpp_android_armeabi-v7ail2cpp_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:
【unity3d IL2CPP for android】δ ??????????: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)

    推荐阅读