was built for newer iOS version (11.1) than being linked (8.0)

日常消滅警告,遇到問(wèn)題如下

ld: warning: object file (/Users/wanglizhi/wanglizhi/workspace/特運(yùn)通/特運(yùn)通/特運(yùn)通/gaode/MAMapKit.framework/MAMapKit(MAMapKit-arm64-master.o)) was built for newer iOS version (11.1) than being linked (7.0)

ld: warning: direct access in function 'sgi::hashtable<sgi::pair<int const, signed char>, int, sgi::hash<int>, sgi::_Select1st<sgi::pair<int const, signed char> >, sgi::equal_to<int>, sgi::allocator<signed char> >::_M_initialize_buckets(unsigned long)' from file '/Users//MAMapKit.framework/MAMapKit(MAMapKit-arm64-master.o)' to global weak symbol 'sgi::__malloc_alloc_template<0>::__malloc_alloc_oom_handler' from file '/Users/*/MAMapKit.framework/MAMapKit(MAMapKit-arm64-master.o)' means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.

1529899243229.jpg

這個(gè)問(wèn)題產(chǎn)生的原因是MAMapKit-arm64-master.o支持的最低版本是11.1,而我項(xiàng)目支持的最低版本是8.0
解決辦法有兩個(gè):

一、將項(xiàng)目支持的最低版本改為11.1

顯然不現(xiàn)實(shí)。

二、在Build Settings -> other lingker Flags 中添加-w 。

以下是我的項(xiàng)目解決前后的警告數(shù)量。


1529898557251.jpg
1529898649380.jpg

參考:關(guān)于解決 was built for newer iOS version (10.0) than being linked (8.0)問(wèn)題

說(shuō)到解決這個(gè)問(wèn)題就要說(shuō)一下天朝最牛b的搜索引擎百度,我一個(gè)月之前就在解決這個(gè)問(wèn)題,一直百度不到方案,后來(lái)新需求比較急就忽略了,今天想起來(lái)之后就google了一下,瞬間解決。
同樣的搜索內(nèi)容Kit-arm64-master.o)) was built for newer iOS version (11.1) than being linked (8.0)
搜索結(jié)果如下:看google一屏幕都是解決方案,我是不知道百度都在干些什么,光顧著打廣告掙錢(qián)了?

1529899854426.jpg

1529899878667.jpg

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀(guān)點(diǎn),簡(jiǎn)書(shū)系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容