Skip to content
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

[React Native] Add 64 bit support for Android #2221

Closed
kneth opened this issue Jan 16, 2019 · 42 comments
Closed

[React Native] Add 64 bit support for Android #2221

kneth opened this issue Jan 16, 2019 · 42 comments
Assignees

Comments

@kneth
Copy link
Member

kneth commented Jan 16, 2019

From August 1, 2019 Google Play will not accept apps with 32 bit only .so files. Currently, we only compile our React Native (Android) .so for ARMv7 and x86, but we should in good time provide 64 bit .so files too.

React Native (Android) added support for ARM64-v8a and x86-64 recently: facebook/react-native#18754.

Reference: https://android-developers.googleblog.com/2019/01/get-your-apps-ready-for-64-bit.html

@roberhofer
Copy link
Contributor

Thanks for raising this, appreciated.

@radeno
Copy link

radeno commented Feb 28, 2019

@kneth i do not force to anyone but i think this should be priority.
3 months after first React Native RC version we get support for 0.58 what was big step forward and i really appreciate it and i can says many developers like it and we are thank you for it ♥️. But it was just partial support of RN 0.58 because it brings support for Android ARM 64bit app variations.

And version 0.59 is behind door. This version should be compatible with Realm which will be great, but again, it enabling support even for x86_64. Android platform is involving in RN very quick.

But another great change for RN0.60 (probability is very high) is that it replaces very unfriendly import Xcode libs with Cocoapods. And it will be default for all new projects.

Do you have any plan how to be complatible with RN in very close time when new RN version will be released?

@kneth
Copy link
Member Author

kneth commented Feb 28, 2019

@radeno Thanks for giving us the executive summary of RN roadmap. Every RN version seems to break something, so it is hard to stay on top of it.

We are currently refactoring our code base and upgrading the Android NDK. Once those two tasks are completed, we can begin to look forward. Adding 64 bit support for Android should be trivial. Better Cocoapods support sounds great.

@bmunkholm
Copy link
Contributor

I would also add, that we are very appreciative of PR's :-) and encourage the community to help in any way possible. Even if that's not a PR, making issues with details of upcoming breaking changes is also helpful.

@cmelchior cmelchior added the Blocked This issue is blocked by another issue label Feb 28, 2019
@cmelchior
Copy link
Contributor

Marking as blocked as we are waiting for React Native 0.59 before we can enable this: facebook/react-native#2814 (comment)

@radeno
Copy link

radeno commented Feb 28, 2019

@cmelchior 0.59-rc3 release is one day old. It is probably last RC before production or will be rc4 with some small fixes. If this commit facebook/react-native@f3e5cce will not be merged into 0.59 (i hope not, it is too big change for current state) then rc3 is quite solid stable without such big changes before release production.

@radeno
Copy link

radeno commented Mar 1, 2019

@cmelchior my mistake. It is already in 0.59. So all big changes with JSI/JNI for Android looks like done.

@roberhofer roberhofer removed the Blocked This issue is blocked by another issue label Mar 1, 2019
@kneth
Copy link
Member Author

kneth commented Mar 1, 2019

In facebook/react-native@f3e5cce React Native is changing to clang and libc++, I suggest that we wait until we have upgraded to a recent Android NDK.

@zaguiini
Copy link

zaguiini commented Mar 14, 2019

RN is already at 0.59. It's stable!

@diegolmello
Copy link

Can we get more attention on this?
Realm just released support for RN 0.58 and became outdated two weeks after that with RN 0.59.

@Mscynol
Copy link

Mscynol commented Mar 21, 2019

realm is not support 0.59(RN) now

@IamStephan
Copy link

realm is not support 0.59(RN) now

I'm confused...
Are you saying that it does work or not?

@kneth
Copy link
Member Author

kneth commented Apr 1, 2019

I believe that RN 0.59 requires some changes that we haven't had time for yet.

@FunkyLambda
Copy link

I think people are getting a bit off-topic here. The original issue was support for 64-bit, not RN 0.59. I realise they are very closely related, but at the same time, as @cmelchior stated in #2282:

64 bit support seems to require changes to https://github.com/realm/realm-js/blob/master/react-native/android/src/main/jni/Application.mk#L3 and https://github.com/realm/realm-js/blob/master/react-native/android/build.gradle#L230, but this does not need to be part of the same PR as 0.59 support

@diegolmello
Copy link

@FunkyLambda I feel you, but one of the bigger new features of RN 0.59 is 64-bit support.
Of course we can change build.gradle architectures to support 32-bit only, but I think you'll agree this is not what RN 0.59 support means.

@radeno
Copy link

radeno commented Apr 2, 2019

@diegolmello 64bit arrived with RN 0.58, 0.59 brings new JSI and compiler.
So i think this topic is about 64-bit support only. RealmJS works with RN 0.59.

@radeno
Copy link

radeno commented Apr 2, 2019

@diegolmello
Copy link

@radeno
Copy link

radeno commented Apr 2, 2019

@diegolmello x86_64 is intel/amd processor. AMR7/8 is 99,9% all mobile devices.

@BrandonSmith
Copy link
Contributor

BrandonSmith commented Apr 11, 2019

@PanRada @TheusBrz Ensure your Android app/build.gradle is only building for 32-bit architectures.

React Native 0.58 is when 64-bit first landed. So comparing the diff between the generated app/build.gradle, ensure your's uses 0.57 values...

android {
...
  splits {
    abi {
      ...
      include "armeabi-v7a", "x86"
      ...
  }
...
}

Ensure that "arm64-v8a", "x86-64" are not in the list.

https://github.com/react-native-community/rn-diff-purge/compare/release/0.57.0..release/0.59.0#diff-b5a6cecd7ee362715d6306d583e73612

@theus-brz
Copy link

@BrandonSmith become able to run my app on Android but it breaks other functionalities and break my iOS app... I'm very excited to use RealmDB but I'm feeling that is not the moment... I'm not an excellent developer yet and my projects deliver dates are close... I plan to move to SQLite for now..

@cristianoccazinsp
Copy link

cristianoccazinsp commented Apr 11, 2019

Any updates on this? Removing "x86_64" from gradle build files is not working.

Edit. Looks like I had to also add:
ndk {
abiFilters "armeabi-v7a", "x86"
}

This looks really bad, forcing 32 bits just because a library. What would be the side effects of this?

Edit 2: Using the above although allowed the app to run, it is now raising errors related to touch events that never happened before. I guess I will be staying away from Realm as well. Shame since it seemed very good when testing on other devices.

@nirinchev
Copy link
Member

Thank you for relaying your concerns. While I understand that this is an issue many care about, flooding the comments with "+1", "I want this fixed now!!11", etc. is not productive. When we have more information to share, we are going to update the issue.

@realm realm deleted a comment from AugustoAleGon Apr 15, 2019
@realm realm deleted a comment from ledouxvi Apr 15, 2019
@realm realm deleted a comment Apr 15, 2019
@theus-brz
Copy link

@nirinchev I'm anxious to start using Realm, I'll keep an eye on this issue to get news.

I wish you a good coding :)

@Eyesonly88
Copy link

Hey @nirinchev, I think people wanna know if this will be resolved before the deadline of 1st of August 2019 or not?

@cmelchior
Copy link
Contributor

It will

@trungthanhnt
Copy link

Does anybody have a hot fix for arm64bit?
I can build but it crash on Android 64bits . Best Regards

@bmunkholm
Copy link
Contributor

It's being worked on now here: #2366.

@kneth
Copy link
Member Author

kneth commented May 15, 2019

@trungthanhnt You need to combine #2221 (comment) and #2221 (comment) until we support 64 bit.

@nhachicha
Copy link
Contributor

this is fixed in v2.28.0

@diegolmello
Copy link

Nice work, @nhachicha @kneth! 👏👏👏

@ferrannp
Copy link

Thank you very much to fix this!

@kneth
Copy link
Member Author

kneth commented May 23, 2019

We hear about crashes - most likely due to facebook/react-native#24261 - on Samsung devices.

@anshul-kai
Copy link

Has there been a decision on which version of react-native will this be packaged in? Thank you!

@kneth
Copy link
Member Author

kneth commented May 24, 2019

@a-koka I don't think the React Native developers have a fix ready yet.

@deepakverma4
Copy link

anyway to support 64bit architecture in 0.55.4?

@kneth
Copy link
Member Author

kneth commented Aug 13, 2019

@0x01001
Copy link

0x01001 commented Dec 9, 2019

still crash on v3.5.0 RN v0.61.5

@kneth
Copy link
Member Author

kneth commented Dec 9, 2019

@0x01001 Please create a new issue - and remember to add all relevant information (outlines in the issue template).

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.