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

前端 未结 6 894
有刺的猬
有刺的猬 2021-01-08 01:11

Today, I face the error mentioned in this post: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.B

6条回答
  •  悲&欢浪女
    2021-01-08 01:57

    Finally I've found a solution. After reading all answers and related issues (Facebook Sdk Android Error Building) and trying many things (libs updating, dependencies, lots of version changes etc.) I managed to build my app again. Then I reverted all unnecessary changes and there's what was left:

    I needed to add 2 things (iterator and line with "force") in my android/build.gradle file (not android/app/build.gradle):

    allprojects {
        configurations.all {
           resolutionStrategy {
             eachDependency { DependencyResolveDetails details ->
               if (details.requested.group == 'com.facebook.react' && details.requested.name == 'react-native') {
                 details.useVersion "0.37.0" // Your real React Native version here
               }
             }
             force 'com.facebook.android:facebook-android-sdk:4.22.1'
           }
        }
    }
    

    Thanks for all the tips anyway!

提交回复
热议问题