简体   繁体   中英

I've two different react native packages which require different android compileSdkVersion, how do I fix this?

I use react-native-music-control and react-native-navigation(by wix) , rnmc requires compilesdkversion 23 and buildToolsVersion '23.0.1' whereas rnn requires compilesdkversion 25 and buildToolsVersion '25.0.0', rnn does not work with 25.0.0/25 and rnn won't work with 23/23.0.1 . I don't have much experience with android so I'm not sure how to fix this, any guidance would be great.

Add the following to build.gradle in your projects root directory

subprojects {
    afterEvaluate {
        android {
            compileSdkVersion 25
            buildToolsVersion "25.0.1"
            defaultConfig {
                targetSdkVersion 25
            }
        }
    }
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM