After creating a build from expo, the Apk needs metro bundle to run. What am I doing wrong? - android

I have created a build for android in expo. I got a standalone link which helped me download an Apk link. I installed that apk in my mobile device but it is not getting connected with the backend (api). When I run metro bundler on my development machine, then the apk works perfectly, it fetches the data from api and displays it.

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.

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).

How to upload android react-native app to hockeyapp

How do I build the react-native app so I can test it in hockeyapp without being connected?
I'm using react-native-hockeyapp and successfully built the app, which listed it on hockeyapp, but now with the hockeyapp changes:
It does not run on a connected device with run-android and I get a white screen and no console debug messages anymore.
When I uploaded the app_Debug.apk to the hockeyapp by dragging it on the website, I got an invite. Run it on my device and get the white screen and the following two errors:
a. unable to load script from assets 'index.android.bundle'. Make sure your bundle is pakcaged correctly...
It then shows a white screen.
b. If I shake and press reload it says: could not connect ot development server. I don't want to connect to development server. I want to test it disconnected!
How do I build the app? In Android Studio? Any pointer to instructions?
And how do I preserve the possibility to react-native run-android so that I can test it locally and debug quickly for development?
I created a keystore and then went to myproject/android folder and gradlew assembleRelease
See https://github.com/benloopcompany/react-native-hockeyapp/issues/84 for more details

Unable to load script from assets index.android.bundle on mac

I have created a basic app using react native. When I run the app using react-native run-android, the app runs successfully on a connected device.
Now I want to share the apk file with the client. For that I have created the apk following the steps mentioned on:
https://facebook.github.io/react-native/docs/0.51/signed-apk-android.html
When I install the app using the generated apk, the app installs successfully, but gives the following error when the app is opened the first time.
After that whenever I open the app, I get a blank screen.

Meteor Android relase apk not working

I built a react-meteor android app, which I signed with Android Studio for a release.
The app is loading with a splash screen and then stuck in den loading screen of my React Komposer ( I guess the subscription does not get ready ).
However running the app via:
meteor run android-device --mobile-server https://fuldacity.de
runs the app successful, as well as running from signed debug apk.
I really do not now where to start to debug this problem. I guess there is a possiblity to get some error logs out of Android Studio? I would be really glad on any inspiration on how to tackle this problem!
Furthermore I have the feeling it is connected to my setup. I have a domain hosted by domainfactory, where I also get my https certificate from. The domain is then redirected to Heroku, where my App is hosted. I furthermore redirect all http:// accesses to https:// via the Meteor package force-ssl.
`
Try like this:
meteor add-platform android
After
meteor install-sdk android
After
meteor run android-device --mobile-server https://fuldacity.de
Long story short the error was on domainfactory where I have choosen the IP instead of the domainname as A configuration for the nameserver.
Domainfactory does not allow a the correct settings for usage of heroku. Now I use the nameservers of Route 53 which could setup the right CNAME settings to heroku.
For the debugging I also learned that you can
meteor run android-device --server https://fuldacity
then go to your chrome browser (on your pc) open the developer tools and there you can find remote devices which gives you all the error outputs from the client side!
This let me to the network error, which only appeared on the mobile devices.

Categories

Resources