【问题标题】:react-native not running on Android post updatereact-native 未在 Android 更新后运行
【发布时间】:2017-06-02 15:42:19
【问题描述】:

今天做了一个 react-native-git-upgrade。然后我遇到了以下错误。

:app:processDebugResources
/../android/app/build/intermediates/res/merged/debug/values-v24/values-v24.xml:3: AAPT: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Borderless.Colored'.

/../app/build/intermediates/res/merged/debug/values-v24/values-v24.xml:4: AAPT: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Colored'.

/../android/app/build/intermediates/res/merged/debug/values-v24/values-v24.xml:3: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Borderless.Colored'.

/../app/build/intermediates/res/merged/debug/values-v24/values-v24.xml:4: error: Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Colored'.

已经讨论过的建议herehere

任何帮助将不胜感激。我的 build.gradle 有

compileSdkVersion 23
buildToolsVersion "23.0.1"

还有

compile "com.android.support:appcompat-v7:23.0.1"
compile "com.facebook.android:facebook-android-sdk:[4,5)"

【问题讨论】:

    标签: android react-native


    【解决方案1】:

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

    您已经在上面链接了这个,但似乎没有表明您已经尝试过解决方案。

    这是react-native-fbsdk 的问题,在他们解决之前,您需要执行以下操作:

    android/build.gradle:

    project(':react-native-fbsdk') {
      configurations.all {
        resolutionStrategy {
           force 'com.facebook.android:facebook-android-sdk:4.22.1'
         }
      }
    }
    

    android/app/build.gradle:

    compileSdkVersion 24
    buildToolsVersion "24.0.2"
    

    以上方法适用于我们的项目,请试一试。您当然需要 v24 SDK、构建工具和支持存储库。

    【讨论】:

    • 是的,没问题,应该适用于 24.0 及更高版本的任何内容。您需要项目覆盖吗?
    猜你喜欢
    • 2021-11-17
    • 1970-01-01
    • 2016-03-30
    • 1970-01-01
    • 1970-01-01
    • 2021-12-21
    • 1970-01-01
    • 2021-03-05
    • 1970-01-01
    相关资源
    最近更新 更多