-
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
React Native 0.62 Universal APK crashed on x86 CPU Android #28489
Comments
Additional Info from Android Studio Logcat
|
|
This needs attention! |
@indralukmana do you have any updates? I'm stucking with this exact error |
same issue in |
hi @dzuncoi , From However, as far as I know we can only use I think you can try to target specific CPU architecture by enabling |
@indralukmana And with 0.61.5, don't generate multiple If u upgraded the project from 0.61.5 to 0.62.2 already, now you need to reverse it by creating a new project with command: Hope this will help you |
Thank you @q-bird for pointing me here. We are experiencing the same issue. I guess we will stay on React Native 0.61.5 then for now. Good news is I just checked the 0.63.0-rc.1 and the issue seems to have gone in that version 🎉 |
As it seems the issue is solved with version 0.8.2 of the soloader, which also is used in the 0.63.0-rc.1. I found this comment helping me fixing the issue for our app: #25923 (comment) |
@okwast |
add this code to your android/app/proguard-rules.pro -keep class com.facebook.jni.** { *; } |
Thank you, I just had some time to try it. I don't think this solve the issue. I did not activate Alternatively, I also tried to activate |
I found a solution from here #25923 (comment) I added this piece of code in configurations.all {
resolutionStrategy {
force "com.facebook.soloader:soloader:0.8.2"
}
} |
@indralukmana I did try your suggestion but it's is not working yet =/ |
Ubuntu - [email protected]
to app/build.gradle
|
@indralukmana Sir, Same issue(As you described above) happening to me. React-Native 0.63.0 |
It's not working as well here. React-Native 0.62.2 |
Finally, I tried this answer and it works now facebook/SoLoader#55 (comment) |
@pxmage thank you! It works!! :) |
Description
I tried to build APK for Android after upgrading my project from 0.61.5 to 062, however the build universal APK crashed.
I then tried to built the APK on a fresh React Native 0.62 project and similar thing happens.
I tried the APK on several emulators. On emulators with x86 CPU it crashed but on x86_64 the APK can run without problem.
I don't know if it is a bug in React Native or I somehow messed up my environments. I would appricate any help, thank you!
React Native version:
Steps To Reproduce
1 Initiate New Project
npx react-native init tryUniversalAPK
cd tryUniversalAPK
2 Create an x86 CPU/ABI based emulator
3 Build (crashed) and Native android log
adb logcat *:S ReactNative:V ReactNativeJS:V
tryUniversalAPK
directoryyarn android --variant=release
adb logcat
running, it shows these errors4 Modify gradle to build APK on separate build per CPU architecture
tryUniversalAPK/android/app/build.gradle
5 Rebuild
cd tryUniversalAPK/android
./gradlew clean
cd ..
yarn android --variant=release
app-x86-release.apk
6 Testing the built APKs
tryUniversalAPK\android\app\build\outputs\apk\release
foldertryUniversalAPK
app in the android emulatorapp-universal-release.apk
to the emulatortryUniversalAPK
app (this is theapp-universal-release.apk
) in the emulatorapp-x86-release.apk
to the emulatorExpected Results
The universl APK able to run without crash
ZIP file containing the built APKs
https://1drv.ms/u/s!AlfNopb2XbjM8hSS8PbpaMsL5DnN?e=hf9iRq
The text was updated successfully, but these errors were encountered: