1

I am newbie in React Native. I have created a demo application using react document and google but when i create release Apk it generate very easily. but when i try to install in my mobile i got error package is corrupted error.

How to resolve this error? and any best practices for react native ?

Thanks in advance.

Yogesh Patel
  • 314
  • 1
  • 11

1 Answers1

-1

There’s just one additional step, which you’ll have to do before every release build. You need to execute the following to create a React Native bundle, which’ll be included with your native Android app: $ react-native bundle --platform android --dev false --entry-file index.android.js --bundle-output android/com/your-company-name/app-package-name/src/main/assets/index.android.bundle --assets-dest android/com/your-company-name/app-package-name/src/main/res/ Don’t forget to replace the paths with correct ones and create the assets folder if it doesn’t exist!

Now just create a release build of your native app from within Android Studio as usual and you should be good to go!

Krunal
  • 103
  • 4