React Native打包Android报错:AAPT: er

2020-09-02  本文已影响0人  芸芸众生_f505

文章来源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'

            }

        }

    }

}

上一篇下一篇

猜你喜欢

热点阅读