首页 > 解决方案 > 带电容器的离子和 Android 未在 IntelliJ 中运行模拟器

问题描述

我跑了 npx doctor 和 npx cap sync

   Capacitor Doctor   

 Latest Dependencies:

  @capacitor/cli: 2.2.1
  @capacitor/core: 2.2.1
  @capacitor/android: 2.2.1
  @capacitor/electron: 2.2.1
  @capacitor/ios: 2.2.1

Installed Dependencies:

  @capacitor/cli 2.2.1
  @capacitor/core 2.2.1
  @capacitor/android 2.2.1
  @capacitor/ios 2.2.1
  @capacitor/electron not installed

[success] Android looking great! 
  Found 0 Capacitor plugins for ios:
[success] iOS looking great! 
~/projects/private/growbox: ()$ npx cap open android
[info] Opening Android project at /Users//projects/private/growbox/android
~/projects/private/growbox: ()$ npx cap sync  
✔ Copying web assets from mobile to android/app/src/main/assets/public in 5.45s
✔ Copying native bridge in 10.89ms
✔ Copying capacitor.config.json in 8.76ms
✔ copy in 5.50s
✔ Updating Android plugins in 15.83ms
  Found 0 Capacitor plugins for android:
✔ update android in 86.12ms
✔ Copying web assets from mobile to ios/App/public in 5.37s
✔ Copying native bridge in 3.78ms
✔ Copying capacitor.config.json in 4.42ms
✔ copy in 5.41s
✔ Updating iOS plugins in 15.84ms
  Found 0 Capacitor plugins for ios:
✔ Updating iOS native dependencies with "pod install" (may take several minutes) in 26.92s
✔ update ios in 26.98s
✔ copy in 1.30ms
✔ update web in 5.00μp
Sync finished in 38.021s

这就是我得到的,然后我跑了:npx cap open android

Got: [info] Opening Android project at /Users//projects/private/growbox/android

而且什么也没发生。我已经运行了模拟器并且所有东西都正确安装了,我正在使用最新的 IntelliJ Ultimate

标签: androidionic-frameworkintellij-ideacapacitor

解决方案


Capacitor open 命令尝试打开 Android Studio,如果您使用 IntelliJ,则必须手动打开它。

有打开不同 IDE 的功能请求https://github.com/ionic-team/capacitor/issues/3242


推荐阅读