2016-10-03 34 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潜在改变你的应用程序的行为是你应该做什么一定增量前进行测试。

相关问题