3

我正在嘗試爲Android構建自定義ROM。 目前,我已經安裝了我的編譯環境並下載了源代碼。製作Android操作系統源代碼失敗

我在下面https://source.android.com/source/building#build-the-code

一切工作的指令在執行source build/envsetup.shlunch,但在執行時make出現錯誤:

external/libcxx/include/cmath:679:9: note: using declaration 
using ::acos; 
     ^
external/libcxx/include/cmath:684:46: error: declaration conflicts with target of using declaration already in scope 
inline _LIBCPP_INLINE_VISIBILITY long double acos(long double __lcpp_x) _NOEXCEPT {return acosl(__lcpp_x);} 
              ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/math.h:708:46: note: target of using declaration 
inline _LIBCPP_INLINE_VISIBILITY long double acos(long double __lcpp_x) _NOEXCEPT {return ::acosl(__lcpp_x);} 
              ^
external/libcxx/include/cmath:679:9: note: using declaration 
using ::acos; 
     ^
external/libcxx/include/cmath:690:1: error: declaration conflicts with target of using declaration already in scope 
acos(_A1 __lcpp_x) _NOEXCEPT {return acos((double)__lcpp_x);} 
^ 
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/math.h:714:1: note: target of using declaration 
acos(_A1 __lcpp_x) _NOEXCEPT {return ::acos((double)__lcpp_x);} 

fatal error: too many errors emitted, stopping now [-ferror-limit=] 
20 errors generated. 
[ 0% 163/43987] host C++: libprotobuf-cpp-full_32 <= external/protobuf/src/google/protobuf/descriptor.cc 
ninja: build stopped: subcommand failed. 
make: *** [ninja_wrapper] Error 1 

#### make failed to build some targets (27 seconds) #### 
+0

您是否找到解決方案? – RisingUp

回答

2

看來,它是由Xcode的9見https://forums.developer.apple.com/thread/87814引起的。我也解決了這個問題。我打算切換到xcode 8.3。我用xcode 8.3和sdk 10.11編譯了android 7.1.2,沒關係,沒問題。

+0

今天我已經驗證了xcode 8.3.3,可以構建android 7.1.2。祝你好運。 –

+0

你救了我的命。謝謝。 – JohnWatsonDev

相關問題