Android Studio not starting when building capacitor app on linux virtualbox



  • I’ve writen a app, which runs fine just using quasar dev, open the drowser, and show no problem.

    but when I do quasar dev -m capacitor -T android, it goes through the build process, and then just opens src-capacitor/android directory, but not android-studio, this is the output from the quasasr command

    $ quasar dev -m capacitor -T android

    Dev mode… capacitor
    Pkg quasar… v1.13.1
    Pkg @quasar/app… v2.0.8
    Debugging… enabled
    Running mode… IDE (manual)

    Configured browser support (at least 86.25% of global marketshare):
    · Chrome for Android >= 84
    · Firefox for Android >= 68
    · Android >= 81
    · Chrome >= 74
    · Edge >= 80
    · Firefox >= 70
    · iOS >= 10.0-10.2
    · Opera >= 65
    · Safari >= 10.1

    App · Reading quasar.conf.js
    App · ⚠️ Detected external IP 10.0.2.15 and using it
    App · Checking listening address availability (10.0.2.15:8080)…
    App · Transpiling JS (Babel active)
    App · Extending Capacitor Webpack config
    App · Generating Webpack entry point
    App · Booting up…

    • Compiling:
    └── Capacitor ████████████████████ 100% done in 38727 ms

    DONE Compiled successfully in 38746ms 20:39:53

    ℹ 「wds」: Project is running at http://10.0.2.15:8080/
    ℹ 「wds」: webpack output is served from
    App · Updated src-capacitor/package.json
    App · Updated capacitor.config.json
    App · Running “/home/tim/devcode/quasar/MythrasEffects/src-capacitor/node_modules/@capacitor/cli/bin/capacitor sync android”

    ✔ Copying web assets from www to android/app/src/main/assets/public in 12.61ms
    ✔ Copying native bridge in 3.67ms
    ✔ Copying capacitor.config.json in 1.23ms
    ✔ copy in 44.49ms
    ✔ Updating Android plugins in 1.25ms
    Found 0 Capacitor plugins for android:
    ✔ update android in 25.26ms
    Sync finished in 0.09s

    App · Updated capacitor.config.json

    ⚠
    ⚠️ Opening Android Studio IDE…
    ⚠️ From there, use the IDE to run the app.
    ⚠
    ⚠️ DO NOT close the terminal as this will kill the devserver.
    ⚠
    ⚠️ DO NOT upgrade Gradle or any other deps as Android Studio will suggest.
    ⚠️ If you encounter any IDE errors then click on File > Invalidate caches and restart.
    ⚠

    This is all running in a Mint Linux virtualbox, and Android Studio starts fine, if I do studio.sh

    Any idea, what I’ve not done, or is going wrong?

    Tim.





  • I’m having the same problem, but on windows. I confirmed that the android skd tools and platform tools are added to path and I created environment variables that go to the SDK root like it says in the capacitor getting started and in the developer link posted by @dobbel.

    When I run the “quasar dev -m capacitor -T android” command, it only opens the windows explorer to the path. It does not open Android Studio.

    Dev mode… capacitor
    Pkg quasar… v1.12.8
    Pkg @quasar/app… v2.0.8
    Debugging… enabled
    Running mode… IDE (manual)

    Configured browser support (at least 86.16% of global marketshare):
    · Chrome for Android >= 84
    · Firefox for Android >= 68
    · Android >= 81
    · Chrome >= 75
    · Edge >= 80
    · Firefox >= 71
    · iOS >= 10.0-10.2
    · Opera >= 65
    · Safari >= 10.1

    App · Reading quasar.conf.js
    App · ⚠️ Detected external IP 192.168.1.74 and using it
    App · Checking listening address availability (192.168.1.74:8080)…
    App · Transpiling JS (Babel active)
    App · Extending Capacitor Webpack config
    App · Generating Webpack entry point
    App · Booting up…

    • Compiling:
    └── Capacitor ████████████████████ 100% done in 8768 ms

    DONE Compiled successfully in 8772ms 7:35:13 AM
    i 「wds」: Project is running at http://192.168.1.74:8080/
    i 「wds」: webpack output is served from
    App · Updated src-capacitor/package.json
    App · Updated capacitor.config.json
    App · Running “C:\code\fleet-service\src-capacitor\node_modules@capacitor\cli\bin\capacitor sync android”

    √ Copying web assets from www to android\app\src\main\assets\public in 10.10ms
    √ Copying native bridge in 1.89ms
    √ Copying capacitor.config.json in 2.71ms
    √ copy in 51.86ms
    √ Updating Android plugins in 794.50μp
    Found 0 Capacitor plugins for android:

    [warn] Your @capacitor/core version doesn’t match your @capacitor/android version
    Consider updating to matching version npm install @capacitor/core@2.4.0
    √ update android in 22.34ms
    Sync finished in 0.088s

    App · Updated capacitor.config.json

    App · ⚠️ IMPORTANT! Could not find MainActivity.java file and therefore cannot enable devServer: https support.

    ⚠
    ⚠️ Opening Android Studio IDE…
    ⚠️ From there, use the IDE to run the app.
    ⚠
    ⚠️ DO NOT close the terminal as this will kill the devserver.
    ⚠
    ⚠️ DO NOT upgrade Gradle or any other deps as Android Studio will suggest.
    ⚠️ If you encounter any IDE errors then click on File > Invalidate caches and restart.
    ⚠



  • @FascistDonut @TimE

    I suggest you create an issue on github.




Log in to reply