React Native Android Release Build Failing - Gradle

后端 未结 2 1819
南旧
南旧 2021-02-04 12:34

I\'ve got a rather complicated project some of which is older code from the past year or so which in React Native time is forever. The regular debug build is working fine but th

2条回答
  •  面向向阳花
    2021-02-04 13:17

    Building upon GenericJam's answer, you can do this programatically to all sub libraries by doing something like this in your project build.gradle file:

    subprojects { subproject ->
        afterEvaluate{
            if((subproject.plugins.hasPlugin('android') || subproject.plugins.hasPlugin('android-library'))) {
                android {
                    compileSdkVersion rootProject.ext.compileSdkVersion
                    buildToolsVersion rootProject.ext.buildToolsVersion
                }
            }
        }
    }
    

提交回复
热议问题