Debugging signed react native apk - react-native

I generated a signed apk but for some reason it does not work as the debug apk does, how can I test it with the debugging feature to view the console and see what issue is there?

if you want to debug the signed apk of react native then please install and run android studio and show the log of signed apk.
2.and second way is"react-native run-android --variant=release" run this command and install signed apk on your phone and then connect with cli and you able to see the log

run project with this commend" react-native run-android --variant=release", release build..

Related

React native apk generation fails

After building the project the APK is generated but it throw the below error when trying to open the app in Android phone.
This happened because you are building a DEBUG type apk, which require JS bundling every time you start the app. You can run react-native start at your project root to startup the metro bundle.
Alternatively, you could build APK for RELEASE mode. Check your project structure, make sure debuggable is set to false.
If you want to run your app in release mode then your can try below command :
react-native run-android --variant="release"
Note: If you have not generated keystore for your project you have to generate it. You can generate keystore by following official doc here.
i think you generate a debug APK, first you must generate a key using jdk -> here is the official doc, here is the summary
generate a keystore
place the generated keystore inside android/app/
Setting up Gradle variables in android/gradle.properties
add release code to android/app/build.gradle
in cmd to generate apk use
cd android && gradlew assembleRelease
the output apk will be in android\app\build\outputs\apk\release
in cmd if you want to generate a bundle use
cd android && gradlew bundleRelease

Can't run the .apk that generated by Expo

I have built an android app using expo build:android for a react native project. And then I can't ran the .apk on my 2 android phones. Error message App not installed was shown after ran the .apk on my phones.
I tried to rollback to older versions of my code and I found that the .apk can ran after I used the old slug value in app.json
I installed the .apk at android emulator. Error message The APK failed to install.
Error: INSTALL_PARSE_FAILED_NO_CERTIFICATES: Package /data/app/vmdl1022936792.tmp/base.apk has no certificates at entry AndroidManifest.xml is shown.
Having no ideas why this happens. How I can use a new slug value and build a valid .apk via Expo?
I feel code signing is the problem, the app is not able to install on another android only for this reason.
Use this link
https://docs.expo.io/versions/latest/distribution/app-signing/
try using command
expo build:android --clear-credentials

Creating Android and iOS app from react-native

I have created one react-native app using expo and atom editor. It's running fine in android device and iOS simulator but with the help of expo. What I want is to generate Apk(debug) so that I can directly run on device. How can I do it ? I followed this(Dmitry Mugtasimov's answer). should I run all those command inside project folder ? Also I don't find index.js file inside my project folder. Also if someone know how to run on iOS simulator by creating app like file(don't know what is that in Ios because from android background). Please help, thanks
Since you have used Expo to develop your react-native app you can build the android app by going to the project folder and running the bellow command in the terminal
expo build:android
The building process will take around 5-10 minutes. When your build is done, expo build:status will give you your .apk file url. If not, it will say your build is still in progress and to try again later.
Also to build the iOS app you can run,
expo build:ios
To build the iOS standalone app you will need to have an Apple Developer account, but for Android standalone app you don't need a Google Play Developer account.
For the above commands to work you need to have expo-cli installed, For this you can run the bellow command,
npm install -g expo-cli
More Info: https://docs.expo.io/versions/latest/distribution/building-standalone-apps/
If you don't have an Apple Developer Account. You can build the iOS
standalone simulator build using the command,
expo build:ios -t simulator
And then wait for build to finish then download and unpack YourAppName.tar.gz. Then, start the iOS simulator and run xcrun simctl install booted YourAppName.app to run the .ica file.
More info: Expo / React-Native, Is it there a way to test-run standalone iOS apps on a device/simulator?

APK does not upload to Fabric Crashlytics

I have a react-native application, whose android apk I want to upload to Fabric Crashlytics and used this guide https://medium.com/komenco/beta-testing-your-react-native-android-application-with-crashlytics-483c7e66a423 . In the terminal, I run:
./gradlew assembleRelease crashlyticsUploadDistributionRelease
And everything seems to go well, I get:
:app:crashlyticsUploadDistributionRelease
Uploading /.../theapp/android/app/build/outputs/apk/app-release.apk to Crashlytics...
BUILD SUCCESSFUL
However, the app never gets uploaded to Fabric Crashlytics. What could be the problem?
Thank you

How to generate signed apk and deploy to google play store

i am using create-react-native-app
there is no android / iOS folder
how to generate signed apk and deploye to google play store
Here are the instructions for create-react-native-app app deployment.
https://github.com/react-community/create-react-native-app/blob/master/react-native-scripts/template/README.md#sharing-and-deployment
If you want to build and deploy your app yourself, you'll need to eject from CRNA and use Xcode and Android Studio.
This is usually as simple as running npm run eject in your project, which will walk you through the process. Make sure to install react-native-cli and follow the native code getting started guide for React Native.
Generating key
https://facebook.github.io/react-native/docs/signed-apk-android.html
If you don't see android/ios folders in your directory. Then type in your terminal react-native upgrade then react-native link