Android app with react-native works on emulator but doesn't on physical device

Viewed 1368

I think title explains itself my problem, on emulator everything works as it should be, when apk builded I have transfered it on my smartphone and there's errors:

https://imgur.com/a/pSEKXHx

1 Answers

I was have the same issue when i assemble Release/Debug apk and install it on my physical smartPhone

Do this commands in your Project Directory :

mkdir android/app/src/main/assets

(if you have the assets folder you will see error like directory is already exist ... no problem! go to next command)

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

react-native run-android or assemble the apk

it should work GOOD LUCK

Related