ionic-team / ionic-team/ionic-cli

Ionic CLI - ionic capacitor run android

オープン
#4,057 コメント 5 件 リアクション 0 件 担当者 0 名 GitHub で見る
capacitor
主要言語
TypeScript
スター
2k
フォーク
682
PR マージ指標
30日以内にマージされた PR はありません

説明

Hello,

One of the ionic cli commands needs a bit of tweaking. `ionic capacitor run android -l` runs by default `ng run app:serve --host=localhost --port=8100` with the server being localhost and port 8100, then it does a `capacitor copy android` and opens the android studio.

When we launch the android emulator, it is watching for changes on localhost:8100, however localhost:8100 is not reachable from the device emulator, the host machine is at 10.0.2.2 (https://developer.android.com/studio/run/emulator-networking).

It seems like we either need a rule to forward localhost to 10.0.2.2 or to let the android studio / emulator handles their own stuff, we can offer 2 urls in capacitor.config.json one url for the angular serve (localhost:8100) and one for the android emulator (10.0.2.2:8100).

Thoughts?

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。