Build issues caused by outdated compileSdkVersion on Android
See original GitHub issueDescription
The build.gradle
files in the Android templates, sample apps and the ReactAndroid library seem to all use compileSdkVersion 23
, which is quite an old version and causes build issues with the latest versions of the Android Support Library: https://github.com/tinycreative/react-native-intercom/pull/75, https://github.com/intercom/intercom-android/issues/316
compileSdkVersion
should generally be set to the latest available stable version, using old versions can cause build issues with newer library versions.
Reproduction
I’ve added a sample project here: https://github.com/ronocod/react-native-android-compile The 1st commit to the repo was the code as generated by RN, the 2nd commit breaks the build by updating to Support Library 25.1.1.
Solution
compileSdkVersion
fields in thebuild.gradle
files for the Android templates, sample apps and the ReactAndroid library need to be updated to 25.- Preferably
targetSdkVersion
,buildToolsVersion
and the Support Library versions would be updated to the latest versions too. - I don’t have much experience with Buck, but it looks like some of the Buck config files will need to be updated too.
- Preferably
- Documentation and CI setup scripts will need to be updated too as SDK version 25 will be needed, not 23.
I have a PR started here, it probably needs more work though: https://github.com/facebook/react-native/pull/12930
As far as I can see, existing React Native apps will have to be updated manually.
Additional Information
- React Native version: February 2017
- Platform: Android
- Operating System: All
- Dev tools: Android SDK 25, Build Tools 25.0.2
Issue Analytics
- State:
- Created 7 years ago
- Reactions:23
- Comments:5 (3 by maintainers)
This issue causes problems to several packages that need version 25 (Intercom-Android being one of them). Can you consider this for change? Thanks!
#16178 I have problem with the version of the sdk and the build tools. Upgrading both of them to the 25 version it works. Can be merged the PR responsible for the upgrade of that stuff please?