简体   繁体   中英

React Native Metro Bundler not starting automatically

I'm using mx Linux which is Ubuntu derivation. Trying to use react-native with genymotion. I did all installation right I suppose.

Android studio latest with some SDK.

Configured PATH like

    export ANDROID_HOME=$HOME/Android/Sdk
export PATH=$PATH:$ANDROID_HOME/emulator
export PATH=$PATH:$ANDROID_HOME/tools
export PATH=$PATH:$ANDROID_HOME/tools/bin
export PATH=$PATH:$ANDROID_HOME/platform-tools

Nodejs version 10.21.0 (tried 12.4.0 and latest also.But result is same ) npm version 5.8.0 (tried newests but same)

Genymotion settings (For SDK path ) done like that

 /home/kaan/Android/Sdk/


    $ npx react-native run-android
info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
Jetifier found 967 file(s) to forward-jetify. Using 12 workers...
info Starting JS server...
info Installing the app...

> Task :app:stripDebugDebugSymbols UP-TO-DATE
Compatible side by side NDK version was not found.

> Task :app:installDebug
01:50:49 V/ddms: execute: running am get-config
01:50:49 V/ddms: execute 'am get-config' on '192.168.56.101:5555' : EOF hit. Read: -1
01:50:49 V/ddms: execute: returning
Installing APK 'app-debug.apk' on 'Samsung Galaxy S6 - 5.0' for app:debug
01:50:49 D/app-debug.apk: Uploading app-debug.apk onto device '192.168.56.101:5555'
01:50:49 D/Device: Uploading file onto device '192.168.56.101:5555'
01:50:49 D/ddms: Reading file permision of /home/kaan/Rn/first/android/app/build/outputs/apk/debug/app-debug.apk as: rw-r--r--
01:50:49 V/ddms: execute: running pm install -r -t "/data/local/tmp/app-debug.apk"
01:50:52 V/ddms: execute 'pm install -r -t "/data/local/tmp/app-debug.apk"' on '192.168.56.101:5555' : EOF hit. Read: -1
01:50:52 V/ddms: execute: returning
01:50:52 V/ddms: execute: running rm "/data/local/tmp/app-debug.apk"
01:50:52 V/ddms: execute 'rm "/data/local/tmp/app-debug.apk"' on '192.168.56.101:5555' : EOF hit. Read: -1
01:50:52 V/ddms: execute: returning
Installed on 1 device.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.2/userguide/command_line_interface.html#sec:command_line_warnings

BUILD SUCCESSFUL in 6s
27 actionable tasks: 2 executed, 25 up-to-date
info Connecting to the development server...
info Starting the app on "192.168.56.101:5555"...
Starting: Intent { cmp=com.first/.MainActivity }
kaan@development:~/Rn/first
$ 

And here is the result. Metro bundler didn't run as aspected as automatically.

I started npx react-native start its working but when I change something it's not updating because npx react-native run-android finished as you see on top.

Did anyone face this problem before ? And anyone can solve this?

I'm using mx Linux which is Ubuntu derivation. Trying to use react-native with genymotion. I did all installation right I suppose.

Android studio latest with some SDK.

Configured PATH like

    export ANDROID_HOME=$HOME/Android/Sdk
export PATH=$PATH:$ANDROID_HOME/emulator
export PATH=$PATH:$ANDROID_HOME/tools
export PATH=$PATH:$ANDROID_HOME/tools/bin
export PATH=$PATH:$ANDROID_HOME/platform-tools

Nodejs version 10.21.0 (tried 12.4.0 and latest also.But result is same ) npm version 5.8.0 (tried newests but same)

Genymotion settings (For SDK path ) done like that

 /home/kaan/Android/Sdk/


    $ npx react-native run-android
info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
Jetifier found 967 file(s) to forward-jetify. Using 12 workers...
info Starting JS server...
info Installing the app...

> Task :app:stripDebugDebugSymbols UP-TO-DATE
Compatible side by side NDK version was not found.

> Task :app:installDebug
01:50:49 V/ddms: execute: running am get-config
01:50:49 V/ddms: execute 'am get-config' on '192.168.56.101:5555' : EOF hit. Read: -1
01:50:49 V/ddms: execute: returning
Installing APK 'app-debug.apk' on 'Samsung Galaxy S6 - 5.0' for app:debug
01:50:49 D/app-debug.apk: Uploading app-debug.apk onto device '192.168.56.101:5555'
01:50:49 D/Device: Uploading file onto device '192.168.56.101:5555'
01:50:49 D/ddms: Reading file permision of /home/kaan/Rn/first/android/app/build/outputs/apk/debug/app-debug.apk as: rw-r--r--
01:50:49 V/ddms: execute: running pm install -r -t "/data/local/tmp/app-debug.apk"
01:50:52 V/ddms: execute 'pm install -r -t "/data/local/tmp/app-debug.apk"' on '192.168.56.101:5555' : EOF hit. Read: -1
01:50:52 V/ddms: execute: returning
01:50:52 V/ddms: execute: running rm "/data/local/tmp/app-debug.apk"
01:50:52 V/ddms: execute 'rm "/data/local/tmp/app-debug.apk"' on '192.168.56.101:5555' : EOF hit. Read: -1
01:50:52 V/ddms: execute: returning
Installed on 1 device.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.2/userguide/command_line_interface.html#sec:command_line_warnings

BUILD SUCCESSFUL in 6s
27 actionable tasks: 2 executed, 25 up-to-date
info Connecting to the development server...
info Starting the app on "192.168.56.101:5555"...
Starting: Intent { cmp=com.first/.MainActivity }
kaan@development:~/Rn/first
$ 

And here is the result. Metro bundler didn't run as aspected as automatically.

I started npx react-native start its working but when I change something it's not updating because npx react-native run-android finished as you see on top.

Did anyone face this problem before ? And anyone can solve this?

There is no solution except running metro bundler manually. Thanks!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM