Why I have this problem with the appbundle? - react-native

I published this app on the playstore (https://play.google.com/store/apps/details?id=com.brawlcalculator) and I want to reduce the dimension of the app using an app bundle. I created the app with React Native and I used in the same project this command to create the apk(./gradlew clean && ./gradlew assembleRelease) and I successfull published it into the playstore, then I created the app bundle with this command (./gradlew bundleDebug) and when I tried to upload the appbundle it gives me an error: "The appbundle have the wrong key". Does I have to upload the apk and the appbundle together?

assembleRelease signs the APK with your release key, while bundleDebug signs the Bundle with your debug key.
Instead, you should upload the Bundle built with your release key, which you can do using the bundleRelease task.

Related

How do I create an app bundle to publish app on Google Play Store?

I have created a react native app for the first time. To publish the app, I have to create an app bundle(.aab).
How do I create an app bundle?
This is what you do to generate an AAB bundle file.
cd android
./gradlew bundleRelease
Look at this for pre-requisites. To extract an APK out of the bundle and test it on a device before upload then use the bundletool from Google.

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

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