# sh external/buildscripts/build_runtime_android.sh Environment: Host = linux Temporary = /tmp Home = /root
Installing NDK 'r10e': $ANDROID_NDK_ROOT not set; using /root/android-ndk_auto-r10e instead Downloading 'r10e' to '/root/android-ndk_auto-r10e' URL: http://dl.google.com/android/ndk/android-ndk-r10e-linux-x86.bin Output: /root/android-ndk_auto-r10e Base: android-ndk-r10e-linux-x86 URL base: http://dl.google.com/android/ndk/ Suffix: .bin Tmp DL: /tmp/android-ndk-r10e-linux-x86.bin Tmp unpack: /tmp/android-ndk-r10e-linux-x86_unpack Dest path: /root/ Dest name: android-ndk_auto-r10e Can't exec "lwp-download": No such file or directory at /root/mono/mono-unity-2017.1/external/buildscripts/PrepareAndroidSDK.pm line 385. Can't exec "/tmp/android-ndk-r10e-linux-x86.bin": No such file or directory at /root/mono/mono-unity-2017.1/external/buildscripts/PrepareAndroidSDK.pm line 403.
Outputing updated environment: 'envsetup.sh'
$ANDROID_NDK_ROOT = /root/android-ndk_auto-r10e
external/buildscripts/build_runtime_android.sh: line 14: source: envsetup.sh: file not found
去下载NDK,再配置
需要在envsetup.sh中设置ANDROID_NDK_ROOT的值
安装后发现缺少 libtool bison
1
yum install libtool bison
出现缺少g++
1
configure: error: You need to install g++
解决 安装g++工具
1
yum groupinstall "Development Tools"
缺少glib2
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
Package glib-2.0 was not found in the pkg-config search path. Perhaps you should add the directory containing `glib-2.0.pc' to the PKG_CONFIG_PATH environment variable No package 'glib-2.0' found Package gthread-2.0 was not found in the pkg-config search path. Perhaps you should add the directory containing `gthread-2.0.pc' to the PKG_CONFIG_PATH environment variable No package 'gthread-2.0' found Package glib-2.0 was not found in the pkg-config search path. Perhaps you should add the directory containing `glib-2.0.pc' to the PKG_CONFIG_PATH environment variable No package 'glib-2.0' found Package gthread-2.0 was not found in the pkg-config search path. Perhaps you should add the directory containing `gthread-2.0.pc' to the PKG_CONFIG_PATH environment variable No package 'gthread-2.0' found configure: error: You need at least glib-2.0 2.4.0
解决办法
1
yum install glib2-devel
再次编译 还是不通过,找到需要安装cmake
1
yum install cmake
到这里已经可以编译 Unity-5.3 版本的libmono.so 但是之后的还是不能编译通过
解决Unity-2017 编译不能通过问题
问题如下:
1 2
It should have been installed in the `/usr/local/lib/mono/4.5/mscorlib.dll' directory.
解决办法: 需要安装Mono 验证 mono版本
1
mono -V
1 2 3 4 5 6
../../unity/unity_utils.h:32:34: error: unknown type name ‘vprintf_func’ void mono_unity_set_vprintf_func(vprintf_func func); ../../unity/unity_utils.h:34:42: error: unknown type name ‘MonoMemoryCallbacks’ void unity_mono_install_memory_callbacks(MonoMemoryCallbacks* callbacks); ../../unity/unity_utils.c:129:35: error: unknown type name ‘vprintf_func’ void mono_unity_set_vprintf_func (vprintf_func func)