-
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
Android Target API Level 26 required in August 2018 #17287
Comments
Any update on this? As with changing the targetSdkVersion to 26, the compileSdkVersion will have to be at least 26 as well. (this is currently still on 23). Our team wants to start using 26 (as we need functionality from that API level), but we want to be sure that it's stable and officialy supported by React Native. |
Thanks for posting this! It looks like you may not be using the latest version of React Native, v0.53.0, released on January 2018. Can you make sure this issue can still be reproduced in the latest version? I am going to close this, but please feel free to open a new issue if you are able to confirm that this is still a problem in v0.53.0 or newer. |
I guess this happened since I didn't use the template. Could anyone just reopen it? Or should I copy-paste my issue text? |
probably best to copy paste :/ |
@se-bastiaan don't take it personal, the team was simply testing a stricter set of rules for the bot - but they already realised it was a bit too strict. The new one won't get closed ;) |
@se-bastiaan, @e2o It's being discussed in the fb group: https://www.facebook.com/groups/react.native.community/permalink/1167833770018866/ |
I assume the bot is configured to close issues without the template because the team wants discussions to happen in other channels than GitHub issues, and questions to be posted on Stack Overflow. |
I don't think this is the case. There are apps with targetSdkVersion > 22 that use RN. |
Posting here what I posted in the fb group, for more visibility: React Native's build.gradle has targetSdkVersion version set to 22: react-native/ReactAndroid/build.gradle Line 239 in 74e54cb
You can still set targetSdkVersion for your app to higher than 22 (I'm using 27). I just changed the targetSdkVersion of my brand-new RN Android app to 27 (created with 'react-native init') and double checked that the version I declared in my app's AndroidManifest.xml has precedence:
So the binary's minSdkVersion is 16 and targetSdkVersion is 27 as I declared. The app runs fine. I don't remember the reason the RN targetSdkVersion is still set to 22. If you have more context, please on the post. I think there were some pull requests that tried to increase the targetSdkVersion but couldn't find them after a few Google searches. |
Well, that's the complete issue. Why is it set to 22 if target API 27 would be stable? I'd say that you'd want to use the latest Android build tools by default and they're currently outdated. That you can change the target doesn't mean that it is supported at all. You're assuming that it is just because someone else changed some number. If you want to build a production app based on that assumption then that's fine, but I'd rather not. |
There are many new behaviors and significant changes that you opt your app into when you move from 22 to 27. Unless you completely understand what the consequences are of doing this, you should leave it as is until RN is updated appropriately. |
In August 2018 all new android applications published to the playStore will have to be with This is a way for Google to force better quality apps (and more secured, from API 22 to 26 there are so many changes...) so a this is good thing. When will |
You're perfectly summarising the issue description. You should check #18095 though, as this issue was closed. No need to ask for an ETA. |
Before commenting, I already manually set No noticeable issue until now (even when using tons of firebase and usual dependencies). I just hope it won't hurt stability or anything else. I stay clearly confident in React-Native (I mean contributors, Facebook people behind etc...). |
* 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 update with this? Anyone using API 26 in production?? |
You will need to add permission requests ala https://facebook.github.io/react-native/docs/permissionsandroid.html since the permission architecture changed around 23. besides that, seems to be working |
Locking down this issue in order to avoid people writing comments here instead of #18095 |
Now I know that this isn't a real bug report. It is not even a real feature request. But I needed to post this somewhere and none of the other channels seemed appropriate.
On 19 December Google announced the following:
source: https://android-developers.googleblog.com/2017/12/improving-app-security-and-performance.html
More specifically:
I believe this is of great importance for React Native since the current default targetSdkVersion seems to be 22. And thus I can only deduce that React Native is not ready for a higher Android API Level. Yes, people have been using React Native using higher API levels but it seems that it's not stable. Time to bump the API Level? Or make sure that everything will work on 26?
TL;DR: You will not be able to release a stable React Native application through the Play Store if you use the default targetSdkVersion starting August 2018. Be ready.
The text was updated successfully, but these errors were encountered: