React-native: No Images are loaded when i build release apk -> RN Android

Created on 18 Dec 2015  路  4Comments  路  Source: facebook/react-native

Recently when i buld my signed APK my Android App loads without any Images. I had this before too, but forgot how i fixed it :( . No idea anymore what the reason was...Maybe someone has an idea?
When i build the debug apk (react-native run-android) Images are loaded.....

Locked

Most helpful comment

I had the same problem.

You can see #4084

To create bundle and assets :

react-native bundle --assets-dest ./android/app/src/main/res/ --entry-file ./index.android.js --bundle-output ./android/app/src/main/assets/index.android.bundle --platform android -dev false

After, in android project on Android Studio, you can go to Build, Generated APK.

Finally, install your apk with :

adb install app-release.apk

All 4 comments

Hey BigPun86, thanks for reporting this issue!

React Native, as you've probably heard, is getting really popular and truth is we're getting a bit overwhelmed by the activity surrounding it. There are just too many issues for us to manage properly.

  • If you don't know how to do something or not sure whether some behavior is expected or a bug, please ask on StackOverflow with the tag react-native or for more real time interactions, ask on Discord in the #react-native channel.
  • If this is a feature request or a bug that you would like to be fixed, please report it on Product Pains. It has a ranking feature that lets us focus on the most important issues the community is experiencing.
  • We welcome clear issues and PRs that are ready for in-depth discussion. Please provide screenshots where appropriate and always mention the version of React Native you're using. Thank you for your contributions!

I had the same problem.

You can see #4084

To create bundle and assets :

react-native bundle --assets-dest ./android/app/src/main/res/ --entry-file ./index.android.js --bundle-output ./android/app/src/main/assets/index.android.bundle --platform android -dev false

After, in android project on Android Studio, you can go to Build, Generated APK.

Finally, install your apk with :

adb install app-release.apk

cd android && ./gradlew assembleRelease should bundle the assets for you in recent releases of RN.

@facebook-github-bot stack-overflow

@PCharpentier "... -dev false" must change to "... --dev false" or may get an error message. Test on rn 0.35

Was this page helpful?
0 / 5 - 0 ratings