ionic-team / ionic-team/ionic-cli
Ionic CLI - ionic capacitor run android
- 主要語言
- TypeScript
- 星號
- 2k
- 分支
- 681
- 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?
貢獻指南
研究方向
從入口點 `ionic capacitor run android -l` 開始,追蹤此處所述的 `ng run app:serve --host=localhost --port=8100`、`capacitor copy android` 和 Android Studio 流程。閱讀 `capacitor.config.json` 和 Android 模擬器網路連線指南;當 Live Reload 能夠到達模擬器,且不會破壞現有的瀏覽器或 Android 工作流程時,即表示完成。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- typescript
- 領域
- cli, mobile-dev
- Issue 類型
- 缺陷
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 活躍度
- 停滯
- 描述清晰度
- 需要釐清
- 新手友好度
- 25/100