但xxx的就是冒出個我假冒android software engineer兩年來從沒遇過的build error
target arm C++: libwebrtc_system_wrappers <= external/webrtc/src/system_wrappers/source/map.cc
In file included from external/webrtc/src/system_wrappers/source/map.cc:11:0:external/webrtc/src/system_wrappers/source/../interface/map_wrapper.h:14:15: fatal error: map: No such file or directory compilation terminated.
make: *** [out/target/product/generic/obj/STATIC_LIBRARIES/libwebrtc_system_wrappers_intermediates/map.o] Error 1
make: *** Waiting for unfinished jobs....
原來是因為我設定了NDK_ROOT…
所以把原先定義在 ~/.profile 裡的NDK_ROOT幹掉就行了
(也有可能你是定義在 ~/.bashrc ?)
(也有可能你是定義在 ~/.bashrc ?)
原先設定
#Android NDK
NDK_ROOT=~/android-ndk-r8
PATH=$NDK_ROOT:$PATH
NDK_Sample=$NDK_ROOT/samples
NDK_Workspace=~/workspace
export NDK_ROOT NDK_Sample NDK_Workspace PATH
NDK_ROOT=~/android-ndk-r8
PATH=$NDK_ROOT:$PATH
NDK_Sample=$NDK_ROOT/samples
NDK_Workspace=~/workspace
export NDK_ROOT NDK_Sample NDK_Workspace PATH
改成這樣 (註解掉)
#Android NDK
#NDK_ROOT=~/android-ndk-r8
#PATH=$NDK_ROOT:$PATH
#NDK_Sample=$NDK_ROOT/samples
#NDK_Workspace=~/workspace
#export NDK_ROOT NDK_Sample NDK_Workspace PATH
#NDK_ROOT=~/android-ndk-r8
#PATH=$NDK_ROOT:$PATH
#NDK_Sample=$NDK_ROOT/samples
#NDK_Workspace=~/workspace
#export NDK_ROOT NDK_Sample NDK_Workspace PATH
記得要讓更改生效~(例如:登入登出)
為什麼這樣就可以了呢?
因為某個Bug…當NDK_ROOT被定義了之後,
webrtc makefiles 便不會去including STL ......Orz
記得Build完code要把NDK_ROOT定義回來哦~