1、需要安装Android NDK,Mac下下载的是一个bin文件,解压NDK .bin文件:
(1)获取文件权限
chmod a+x android-ndk-r10c-darwin-x86_64.bin
(2)解压出文件
./android-ndk-r10c-darwin-x86_64.bin
2、构建脚本中的参数设置
if(isUseIL2Cpp) PlayerSettings.SetScriptingBackend(BuildTargetGroup.Android, ScriptingImplementation.IL2CPP); else PlayerSettings.SetScriptingBackend(BuildTargetGroup.Android, ScriptingImplementation.Mono2x);
3、查看Android运行log
cd your_android_sdk_path/platform-tools
./adb logcat -s Unity