React Native - build apk with plugins - android

I’m using react-native-push-notifications to send local notifications on my react native app. The app works perfectly on my android emulator and on any physical device while using react-native run-android. But when I signed my app and build an apk throw gradlew assemblerelease the apk builds without compiling react-native-push-notifications and the app does not send notifications. I think I should link the plugin with build.gradle but I’ve searched for a while and didn’t figure how.

Related

React Native app crashes after installed on real device

Just rebuilt React Native app as the previous version failed in building on Android emulator. The React Native is upgraded from 0.66 to 0.67 and a few other modules, such as React Native gesture handler, were upgraded as well.
The app works fine on Android 2021.1.1 Patch 2 emulator. However after downloading the release package from the distribution server, the app installed on Android 10 device quits as soon as launching without giving any error.
What is the problem with the release package? Here is the build steps:
./gradlew bundleRelease
bundletool build-apks to build mypackage.apks with signature.
unzip it into mypackage.apk
Connecting android device to dev Mac using USB cable, the app was launched successfully on the real device. And the app can be launched successfully late as well. I notice that the size of the app is 77MB which is about twice as big as the app installed from the universal apk.
If you need to check apk on real device, follow this build steps:
Release APK Generation.
Place your terminal directory to Android using:
cd android
Then run the following command:
For Windows:
gradlew assembleRelease
For Linux and Mac OSX:
./gradlew assembleRelease
As a result, the APK creation process is done. You can find the generated APK at android/app/build/outputs/apk/app-release.apk. This is the actual app, which you can send to your phone or upload to the Google Play Store. Congratulations, you’ve just generated a React Native Release Build APK for Android.
There are frequent errors that show up in this process sometimes, which is typical to a React Native app, given React Native is continuously evolving. We are laying out here the most frequent React Native build errors that we ran into, to save you time and headaches.

debug version of an apk got blocked by play services

I'm trying to build my app for developing purpose, It worked before but when I'm trying to build it on a new computer Google Play Protect blocks my app.
My application is build on Ionic 4, on a new computer (I develop it on another computer).
I tried to build it with debug option but it didn't work.
I did a research and found some answers, this was the most logical: Debug app blocked by play protect
I tried to delete the debug key from the ~/.android/ directory and after it didn't work I tried to delete all cache data from the ~/android/ directory.
I also saw this question installation app blocked by play protect but he had problem with release apk and not with debug apk as I have.
How am I trying to build:
ionic cordova build android --prod --debug
After it didn't work I tried to clean my configuration:
cordova clean
didn't work either.
The error message that I get is that the app developer isn't recognize to google.
Expected result is: be able to install debug application for developing purpose.

Expo: what is the difference between expo build and expo upload

What are difference between expo build and upload. Does upload cmd still return a standalone app. I realized if i run on Expo Client will work fine but when build a standalone version, the application does not behave the same again.
The commands build and upload are very different ones. The build command (Expo documentation on building) builds a standalone app, while the 'upload' command (Expo documentation on uploading) uploads the standalone app that you've built to the App Store or the Play Store (Your Choice).

Could Not Load App error APK Android React Native

So, I'm stuck with an error after generating APK with React-Native. I tried on multiple computers, 32-bit and 64-bit operating system and had no success.
How I got here
First, I created my app with
create-react-native-app suporteecontrole
Then I started developing my app, installing dependencies, and etc. After making sure that the APP was running without any errors, I ejected with the command line:
npm run eject
I've put my expo credentials and it worked without any errors too. I figured that it was going to work.
Generating APK's
To generate APK, i followed the instructions on this link:
React Native Build Signed APK
1 - I installed the JAVA 8 SDK, and all dependences too.
2 - I generated the Key by following the step one on the link.
3 - I changed all gradle files according to the link
4 - Then I runned this lines on cmd:
cd android
And
gradle assembleRelease
No errors popped up. I made it to the build successfully.
So, It generated some files: app-dev19-release.apk, app-dev-release.apk, app-devRemoteKernel-release.apk, app-prod-release.apk.
I installed app-prod-release.apk on my mobile, and returns an Expo error:
Could not load app
photo_2018-07-24_12-57-51
I searched Google for this, and found nothing.
Can anybody help me with this?
It is frustrating how the create-react-native does expo by default instead of normal react app. But you've already ejected from the expo app, and your code now wont be working on it.
Instead you'll see a new app on your phone with the name and icon you chose. Try to find the App and run it. And to assemble a release, you actually need to sign it too, so I hope you've done the signing right. Take a look at this https://facebook.github.io/react-native/docs/signed-apk-android.html for signing if you face that error.

Ionic package build android not working

I am trying to publish my app for Android and iOS using Ionic Cloud Package. When I do this I am successfully creating the .apk and .ipa but the app does not work on my device. However when I build the app for android using ionic build --release I am getting a working application. Why are these two methods behaving differently. I would like to use cloud Packaging. Because I do not have a mac. So Without it I cannot create an app for iOS.
You could use Phonegap Build for Building in the cloud.
This method requires you to install phonegap cli.

Categories

Resources