React Native打包Android报错:AAPT: error: resource android:attr/fontVariationSettings not found.

文章来源:https://www.jianshu.com/p/097498b583c0

解决方案:

在android/build.gradle中加上以下代码:

subprojects {

    afterEvaluate {project ->

        if (project.hasProperty("android")) {

            android {

                compileSdkVersion 27

                buildToolsVersion "27.0.3"

            }

        }

        configurations.all {

            resolutionStrategy {

                force 'com.google.android.gms:play-services-gcm:16.1.0'

                force 'com.google.android.gms:play-services-location:16.0.1'

                force 'com.google.android.gms:play-services-basement:16.2.0'

                force 'com.google.android.gms:play-services-auth:16.0.1'

                force 'com.google.android.gms:play-services-stats:16.0.1'

                force 'com.google.android.gms:play-services-base:16.0.1'

            }

        }

    }

}

你可能感兴趣的:(React Native打包Android报错:AAPT: error: resource android:attr/fontVariationSettings not found.)