-
Notifications
You must be signed in to change notification settings - Fork 24.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RN 0.47 seems to be working fine with gradle 4.0 and compileSdkVersion / buildToolsVersion 26 #15448
Comments
Are you using these settings for an app out in production? |
yes, I am, and also using with |
Interesting, how long have you been using these settings? Is it performing well in Android 7? Since I've upped to 25 (both compile and buildtools) some users have crashes I don't know how to debug (#15429) on Nougat. And, follow-up, if you submit to the Google Play Store a build targetting 26, can you reverse to 25? 'cause I know you can't when upping from 23 to 25 it's a "no turning back" point. |
well, I'm not using Google Play, so I'm not sure. I'm testing on Samsung J7 with Android 6.0.1 and Android 7 as well, both seems to be working fine with a lot of intricate third party modules (like react-native-maps, react-native-camera, etc) That error doesn't seem to be a problem with the buildTools per se, but it might be related to the SDK version, and guess it might be some bugs since it's the 'edge' of the Android SDKs (a quick googling showed that is a pretty common error on native Android using Java, even without react-native) |
Still have issues: |
Ok, I've tried to update my app too to 26 settings provided above, everything seems to be running fine for now. I think tbh this issue could be closed, anyway, because it's not really "an issue". |
Ok. But I still cannot say that RN is stable. |
it is not recommended to use compileSdkVersion 26 on production?? What do you guys think? |
Some braking changes not resolved in Android Oreo (7+, 8.0.0): |
@agrass I think you mean |
@pocesar I have |
thanks @iegik for the references. what about v25, it is the same?? |
25 - more stable
|
thanks, but suitable for production?? Anyone already using it? |
I would not to promote stable release since of https://github.com/facebook/react-native/releases/tag/v0.40.0 because:
|
I've been using 25 in prod and it's mostly stable, aside from an Android 7 issue. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Maybe the issue has been fixed in a recent release, or perhaps it is not affecting a lot of people. If you think this issue should definitely remain open, please let us know why. Thank you for your contributions. |
not many tests were done in recente android sdk versions. Google itself ask to always use the latest SDK versions, and RN is still stuck in 23 by default. Maybe create a matrix testing for the CI? |
I think this should remain open, currently I'm trying to use version 26 on our prod app and I'm facing some weird issues only when I test the app on Android 8. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Maybe the issue has been fixed in a recent release, or perhaps it is not affecting a lot of people. If you think this issue should definitely remain open, please let us know why. Thank you for your contributions. |
#17287 shows urgency on the issue |
* Updated packages: * react: ^16.3.2 (was ^16.3.0-alpha.1) * react-native: ^0.54.4 (was ^0.54.4) * native-base: "^2.4.4 (was ^2.4.2) * redux: ^4.0.0 (was ^3.7.2) * react-test-renderer: ^16.3.2 (was 16.3.0-alpha.3) * NOTE: I read the update notes and these should be safe changes, including "redux", which got a major version update. * Gradle-related changes: * Changed the way how the SDK is defined in the Gradle configuration: Now this is configured globally in `/android/build.gradle`, which gets rid of the version warnings. * Updated Gradle to version 4.4 (was 4.1). * Updated the Gradle plugin to version 3.1 (was 3.0.1). INSTALLATION STEPS: =================== rm package-lock.json rm node_modules npm install --no-optional // (NOTE: "--no-optional" needed on Windows) TROUBLESHOOTING: ================ * If there are any errors like "could not delete folder x", remove those folders manually, e.g.: rm C:\r3\android\app\build\intermediates\incremental\processDebugResources rm C:\r3\android\app\build\generated\source\r\debug\org\webkit * If there are errors like "unable to create folder x", try again. It should work on the second time. READ ==== * Main motivation: * We should have an SDK version which is at least v26, since that will be the minimum to be accepted in the Play store after August 2018: facebook/react-native#17287 facebook/react-native#19297 * Regarding Gradle, the latest versions are required to build for the lastest SDKs, but will also increase compilation time a lot: facebook/react-native#15448 * React Native Maps installation and Gradle upgrade instructions: https://itnext.io/install-react-native-maps-with-gradle-3-on-android-44f91a70a395 * Migration instructions for the Android Gradle Plugin v3.0.0: https://developer.android.com/studio/build/gradle-plugin-3-0-0-migration * List of versions of the Android Gradle Plugin and upgrade steps: https://developer.android.com/studio/releases/gradle-plugin
Any news on this? Updating Gradle makes our Android builds 50x faster. That is really significant and would benefit the developer experience! |
Hey, just wanted to point out that when ejecting from Expo, you already use SDK26. Many of us have SDK26 Expo ejected apps in production (I have one, Expo SDK22, Android SDK26), so I guess it should be safe to target SDK26. I've been fine with Gradle 4.1. |
Closing this issue, because RN 0.57 will have SDK 27, Support library 27.x, gradle 4.x and android gradle plugin 3.x |
The build went from 6 minutes (for a 35 file project) down to 24s, on a second wind after the gradle daemon has already started with at least 1500MB memory...
Maybe encourage new projects to use those optimized settings, since I'm also using a lot of third party android Java modules, with no incompatibilities issues.
my
build.gradle
looks like this:gradle-wrapper.properties
:in
build.gradle
insideapp
folderalso, I was this settings since 0.46, and
react-native-git-upgrade
without any issues as wellThe text was updated successfully, but these errors were encountered: