2016-10-03 73 views
0

,當我嘗試添加Facebook在應用程序庫通知我收到這些錯誤錯誤檢索父的項目:無資源發現在給定的名字相匹配「的Android版本:Widget.Material .....」

compile 'com.facebook.android:notifications:1.0.2' 

Error:(33) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Button.Colored'. Error:(4) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Inverse'. Error:(33) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Button.Colored'. Error:(4) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Inverse'.

編譯sdk版本是22,編譯工具版本是23.0.2。
推送通知書庫 - https://github.com/facebook/FBNotifications

我知道如果我將編譯sdk版本更改爲23,此錯誤將消失。但在我的項目,我使用了過時的版本,23其不可能在此刻,一些方法來改變編譯SDK版本至23

是否有任何其他方法,使這個錯誤消失

+0

不推薦使用的方法仍然有效,您編譯的SDK不會更改該方法。 – ianhanniballake

+0

你解決了嗎?如果是,請回答問題 –

回答

1

有沒有解決辦法除了將您的編譯SDK版本更改爲23或不使用該庫。如果庫是針對更高版本的SDK構建的(並且需要該SDK中的新API),那麼您的應用也必須針對更高版本的SDK進行構建。

Picking your compileSdkVersion blog post

It should be emphasized that changing your compileSdkVersion does not change runtime behavior. While new compiler warnings/errors may be present when changing your compileSdkVersion, your compileSdkVersion is not included in your APK: it is purely used at compile time.

這是targetSdkVersion潛在改變你的應用程序的行爲是你應該做什麼一定增量前進行測試。

相關問題