React native EAS Android Build fails - android

Im trying to build My Expo app with EAS build, but it keeps failing, this fails for Android, i am not sure about IOS, i think it has to do with React native navigation
Here is a Screenshot of my package json

the solution to this problem was the library react-native-navigation:#7.26.0, apparently this library is not compatible with eas build or Expo Go as stated here
I removed the library from my app (i actually never imported it) and my build was successfull

Related

Error after buillding React Native on version 0.70

Error description
After the App builds successfully, I got this error at my Metro while trying to install the app.
My react-native version is 0.70.
This the error:
Error: Exception in HostFunction: java.lang.UnsatisfiedLinkError: dlopen failed: library "libreanimated.so" not found
This can happen for other reasons as well. For me, it happened because in the
android\gradle.properties file I did not enable the Architecture that I was trying to deploy to:
reactNativeArchitectures=armeabi-v7a,arm64-v8a,x86,x86_64
Make sure, the Emulator Arch or if you are using a physical device then that Arch is enabled in the above line.
The error is coming because of react-native-reanimated library either remove the library or
Use latest version
And
Go to root folder
cd android && ./gradlew clean
or check this
https://github.com/software-mansion/react-native-reanimated/pull/3551/commits/25defa25d22a50dc068ac720ac4f3d7bde76aa17
I think you didn't add the proguard rules inside the android app folder and follow the instructions they had given on the website
https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/installation
Moreover, if you are using the react native version 0.68 & docs say to install the library which react native reanimated#next but it produces an error (merging error with the Hermes) until now there is no stable version of the reanimated library for the react native v0.70. Installing the lower version(stable version) is a better move than doing with the latest version

react native run-android live reload not working

When I use npx react-native run-android command to run my project on android the live reload feature doesn't work and I can't even bring up the developer menu using Command + M.
When I run the same project on iOS using npx react-native run-ios everything works fine. What am I doing wrong?
I'm using MacOS 10.15.5 and React native 0.62.2. Not using Expo.
Managed to fix this. There were two issues with my project. Firstly BuildConfig was being imported from react in my MainApplication.java file. According to this post: https://stackoverflow.com/a/43183752/9295598 it should come from my package. Once I resolved this I noticed that my package name didn't match my folder structure. Seem like I renamed my project in the past and didn't update the folder structure.
Once the folder structure was fixed and BuildConfig was imported from my project, the BuildConfig.DEBUG started working as intended which fixed the rest of the issues.

RNFirebase core module was not found natively on android

I am trying to run an existing react native app on android platform and I am getting the error as in the below image. I have already followed all the steps mentioned under http://invertase.link/android, but I still am facing this error.
I am a complete beginner in react native, have already exhausted all the solutions available on the web and this post is my last resort.
You have to add import io.invertase.firebase.RNFirebasePackage; and new RNFirebasePackage() in the MainApplication.java
In my case I deleted my app from emulator and reinstall that by giving the command (react-native run-android) and that process worked for me.
I had this same exact issue, and the underlying issue was that Invertase's starter project was already ejected from Expo and utilizing native modules. Expo was unable to link those. To integrate Firebase in Expo, I redid my project using create-react-native-app, copied all the source JS files over, then followed this guide, doing npm install --save firebase. I had to reinstall all the dependencies again with npm, but integrating Firebase was much easier.

React Native fails to run when built from Android Studio: ( Module AppRegistry is not a registered callabble module (calling runApplication) )

I am experiencing a strange situation with my React Native project and Android Studio.
BUILDING DEBUG
Using the react-native command line tools, I can build and run my Android app without any problem. (using react-native run-android)
However when I try and build my debug app from Android studio, i get the following error on launch - Module AppRegistry is not a registered callabble module (calling runApplication)
BUT, if I do react-native run-android first, which installs the build and launches the javascript loader terminal, and then after that I continue triggering builds from Android Studio all is well.
So it appears that using Android Studio to build and install a fresh version of the app doesn't work anymore (i have a feeling that the fact that it doesn't launch the javascript package loader terminal is a clue).
BUILDING 'RELEASE'
Similar problems when I try and build the release version.
I can use react-native run-android --variant=release to build and install the APK to a device, with no problem.
If I try and build the release from Android Studio, however, I get a new error on compile which is -
`Execution failed for task ‘:app:bundleReleaseJsAndAssets’
> A problem occurred starting process ‘command ‘node’’`
So it appears that something is wrong with my Android Studio, seeing that I can do everything I need to via react-native command line, but Im not sure what it could be..? I have a feeling that both the debug and release build problems are related, and I feel like its got to do with how Android Studio is triggering the javascript/node stuff. But unsure how to fix, or make sure.

Phonegap SyntaxError:Unexpected Token

So I'm running the phonegap build command
phonegap build android
But I'm getting a bunch of Unexpected Token.
I haven't done anything to any of those files so I'm wondering why it's throwing those errors.
You can use build.phonegap.com to build once to verify that there is no problem with the hybrid code. If you can build it there then that indicates there is some issue with the setup like android sdk/version etc or plugins that are installed.

Categories

Resources