QMUI Android框架升級到1.1.6後,編譯報not found的錯誤,原來是要加入appcompat兼容包。

一段時間沒關注,QMUI Android框架從1.1.3升級到了1.1.6,欣喜的在gradle中將版本號升級到1.1.6,然後點擊同步。

結果報錯了!

這是最不願意看到的情況,而且還是錯誤一大堆。都是not found的錯誤。

error: style attribute 'attr/colorPrimaryDark (aka net.dalu2048.wechatgenius:attr/colorPrimaryDark)' not found.

error: style attribute 'attr/colorPrimary (aka net.dalu2048.wechatgenius:attr/colorPrimary)' not found.  

error: style attribute 'attr/colorAccent (aka net.dalu2048.wechatgenius:attr/colorAccent)' not found.    

error: style attribute 'attr/colorControlNormal (aka net.dalu2048.wechatgenius:attr/colorControlNormal)' not found.    

 

 

 

鬱悶和搞了好久,最後終於找到原因。原來是新版本需要依賴兼容包。

在gradle中添加appcompat的引用即可。添加下面這行:

implementation 'com.android.support:appcompat-v7:28.0.0-rc01'

再編譯,問題解決。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章