im quite new on react native and i want to build this app so it can run remotely on device , on debug everything went fine, it uses api and xampp mysql for db
when i try to build apk release and run npx react-native run-android --variant=Release the build is successful but when i open the app it instantly crashed
im wondering if it because my api and db still not hosted yet , must it hosted first and only then u can release it ? i kinda want to try it on device before hosting my db and api
i try adb logcat *:E and this is what i got
https://drive.google.com/file/d/1lv4X2U4QjMyeNMlNTo5jDe243pUMALbl/view
I've fixed it , it just need to use axios https instead of axios http
and i import usestate wrong , bcs its automatic
i've actually tried this before but i think i've tried this fix separately and i already reverted one of them with git , so i thought 2 of these things is not the solution
tried 2 of them again today bcs of desperate and thankfully it worked
Related
when I use the WebView on expo with an external uri which I’m not the owner (I’m doing an SSO Auth page that uses cookies), if I open on iOS everything works fine, but if I try on Android it gives me error code 2 "SSL ERROR: Hostname Mismatch" and I can’t open the webpage. I don’t know how to solve this in a good way, I’m using react-native-webview with expo sdk 39 (not bare workflow, but totally with expo). Even if i edit the node_modules files in react-native-webview-removing the handleOnSslError check in Android folder it seems to not detect the changes.
Here the console error showed
I hope hearing from you as soon as possible for a solution or a workaround, I'm really in trouble with this problem for weeks!
What I did that I tried with nonsecured URL for example:-
https://google.com
try replacing it with http://google.com
and it worked for me.
I am having a problem that I do not know why this is happing, I am using axios to make request a api, it working fine on emulator, but when I build the apk and install it on the phone, looks like it is not getting the request, I installed the same apk on emulador bluestacks and is working fine, it is my first app react native, and I do not know why this happen, some one had a experience like it ? and could help
I fixed it, to work in Release Apk, I need to put
android:usesCleartextTraffic="true"
in the tag application on android manifest
I had developed a flutter application with Razorpay payment gateway. While I run this app in debug mode, it works fine. And hot reload also works fine. Then I generate apk using flutter build apk command, After installing this application with that apk file. While entering into the Razorpay payment gateway the app stops.
And this same case also occurs in another application also, I'd developed another app with Jitsi video connection setup. While entering the Video connection gateway stops. and of course, this also worked fine in debug and hot reload mode.
I'd found something, app stopes only when Loading com.google.android.webview in my above specified two cases.
My log shows that,
I/WebViewFactory(pId): Loading com.google.android.webview version XX.X.XXXX.XXX (code codeId)
I forgot to add proguard-rules.pro file at android/app. So only these two apps stoped while installed with apk.
For Gitsi - https://github.com/gunschu/jitsi_meet/blob/master/example/android/app/proguard-rules.pro
For Razorpay - https://github.com/razorpay/razorpay-flutter/issues/42
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.
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.