Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
324 views
in Technique[技术] by (71.8m points)

React-native android: Can run app by command but cannot run by android studio

I'm not sure why after i upgraded react native to :

"react": "^16.13.1",
"react-native": "^0.63.3",

i can run app by command npx react-native run-android, but cannot run in android studio (I've tried on emulator and real device, both also cannot). Cannot run as in it got response in android studio, but if i shake device to refresh, it display: could not connect to development server.

And i also noticed the steps of generate apk is changed, normal way is clean>build>generate APK, but after i update, i need to change to: delete index.android.bundle file, then clear gradlew etc (step to update index.android.bundle ref link: https://medium.com/@adityasingh_32512/solved-unable-to-load-script-from-assets-index-android-bundle-bdc5e3a3d5ff). Anyone have faced this issue before? any solution for this?

question from:https://stackoverflow.com/questions/65559548/react-native-android-can-run-app-by-command-but-cannot-run-by-android-studio

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...