I am learning react native. I can successfully connect my android device using USB. But when I try to connect it using wifi, it gives me an error.
$ adb kill-server
$ adb version
Android Debug Bridge version 1.0.40
Version 4986621
Installed as /home/subtleseeker/Android/Sdk/platform-tools/adb
$ adb connect 172.26.40.211:8081
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
connected to 172.26.40.211:8081
$ adb devices
List of devices attached
172.26.40.211:8081 device
$ react-native run-android
JS server already running.
Building and installing the app on the device (cd android && ./gradlew installDebug)...
Starting a Gradle Daemon, 1 incompatible and 1 stopped Daemons could not be reused, use --status for details
cache results.bin (/home/subtleseeker/.gradle/caches/transforms-1/metadata-1.1/results.bin) is corrupt. Discarding.
> Task :app:installDebug
Installing APK 'app-debug.apk' on 'POCO F1 - 8.1.0' for app:debug
Installed on 1 device.
BUILD SUCCESSFUL in 31s
27 actionable tasks: 1 executed, 26 up-to-date
Running /home/subtleseeker/Android/Sdk/platform-tools/adb -s 172.26.40.211:8081 reverse tcp:8081 tcp:8081
error: more than one device/emulator
Could not run adb reverse: Command failed: /home/subtleseeker/Android/Sdk/platform-tools/adb -s 172.26.40.211:8081 reverse tcp:8081 tcp:8081
Starting the app on 172.26.40.211:8081 (/home/subtleseeker/Android/Sdk/platform-tools/adb -s 172.26.40.211:8081 shell am start -n com.awe4/com.awe4.MainActivity)...
Starting: Intent { cmp=com.awe4/.MainActivity }
In the Dev settings
of the app, I have configured Debug server host & port for device
to the ip address of my computer as 172.26.43.71:8081
. Also it is clear from the output, that the connection was successful and the apk is installed.
I can't see how to resolve this error: error: more than one device/emulator
. Any help is appreciated.
NOTE: This question may be a duplicate of this, but it doesn't have any answers.