unity3d IL2CPP for android

Posted U_探索

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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:

δ??????????: 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的主要内容,如果未能解决你的问题,请参考以下文章

Unity将来时:IL2CPP是什么?

手游逆向初探Unity3d+il2cpp.so网游修改新手教程篇[内附所有相关工具下载地址和说明介绍

手游逆向初探Unity3d+il2cpp.so网游修改新手教程篇[内附所有相关工具下载地址和说明介绍

IL2CPP

Unity Android IL2CPP 无法正常运行 Building 64bit aab Error

Unity3d外包团队:Unity3d最新版本更新内容