react-native-fbsdk error: No resource found that matches the given name: attr 'android:keyboardNavigationCluster'

岁酱吖の 提交于 2019-11-26 23:01:14
Syed Zain Ali

Go to React-Native Project : android/build.gradle file and restrict fbsdk Version to 4.28.0.

allprojects {
    repositories {
        ...
        configurations.all {
            resolutionStrategy {
                force 'com.facebook.android:facebook-android-sdk:4.28.0'
            }
        }
    }
}

If you have another error like below:

Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Colored'`.

You can try:

allprojects {
    repositories {
        ...
        configurations.all {
            resolutionStrategy {
                force 'com.facebook.android:facebook-android-sdk:4.22.1'
            }
        }
    }
}

Source: rafaesc

you go to YOUR_PROJECT/node_modules/react-native-fbsdk/android/build.gradle

looking for line 19:

dependencies {
    compile 'com.android.support:appcompat-v7:25.0.0'
    compile 'com.facebook.react:react-native:+' // support react-native-v0.22-rc+
    compile('com.facebook.android:facebook-android-sdk:4.+')
}

change compile('com.facebook.android:facebook-android-sdk:4+') to compile('com.facebook.android:facebook-android-sdk:4.28.0')

It work for me

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!