Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android Studio (IDE) not launching anymore on latest version #12368

Closed
francoism90 opened this issue Feb 6, 2022 · 9 comments
Closed

Android Studio (IDE) not launching anymore on latest version #12368

francoism90 opened this issue Feb 6, 2022 · 9 comments
Assignees
Labels
area/cli bug/1-repro-available A reproduction is available and needs to be confirmed. flavour/quasar-cli-webpack kind/bug 🐞 Qv2 🔝 Quasar v2 issues

Comments

@francoism90
Copy link
Contributor

francoism90 commented Feb 6, 2022

What happened?

$ cd project
$ quasar build -m capacitor -T android --ide

What did you expect to happen?

Launch Android Studio IDE

Reproduction URL

https://codepen.io/rstoenescu/pen/xxEvBLR

How to reproduce?

  1. Install Android Studio 2021.1.1.21-1
  2. Run quasar build -m capacitor -T android --ide
  3. Nothing happens

Flavour

Quasar CLI (@quasar/cli | @quasar/app)

Areas

Quasar CLI Commands/Configuration (@quasar/cli | @quasar/app)

Platforms/Browsers

Android, Other

Quasar info output

Operating System - Linux(5.16.5-zen1-1-zen) - linux/x64
NodeJs - 17.3.0

Global packages
  NPM - 8.4.1
  yarn - 1.22.17
  @quasar/cli - 1.2.2
  @quasar/icongenie - Not installed
  cordova - Not installed

Important local packages
  quasar - 2.5.3 -- Build high-performance VueJS user interfaces (SPA, PWA, SSR, Mobile and Desktop) in record time
  @quasar/app - 3.3.2 -- Quasar Framework local CLI
  @quasar/extras - 1.12.5 -- Quasar Framework fonts, icons and animations
  eslint-plugin-quasar - Not installed
  vue - 3.2.29 -- The progressive JavaScript framework for building modern web UI.
  vue-router - 4.0.12
  vuex - Not installed
  electron - Not installed
  electron-packager - Not installed
  electron-builder - Not installed
  @babel/core - 7.16.12 -- Babel compiler core.
  webpack - 5.67.0 -- Packs CommonJs/AMD modules for the browser. Allows to split your codebase into multiple bundles, which can be loaded on demand. Support loaders to preprocess files, i.e. json, jsx, es7, css, less, ... and your custom stuff.
  webpack-dev-server - 4.7.3 -- Serves a webpack app. Updates the browser on changes.
  workbox-webpack-plugin - 6.4.2 -- A plugin for your Webpack build process, helping you generate a manifest of local files that workbox-sw should precache.
  register-service-worker - 1.7.2 -- Script for registering service worker, with hooks
  typescript - 4.5.5 -- TypeScript is a language for application scale JavaScript development
  @capacitor/core - 3.4.0 -- Capacitor: Cross-platform apps with JavaScript and the web
  @capacitor/cli - 3.4.0 -- Capacitor: Cross-platform apps with JavaScript and the web
  @capacitor/android - 3.4.0 -- Capacitor: Cross-platform apps with JavaScript and the web
  @capacitor/ios - Not installed

Quasar App Extensions
  *None installed*

Relevant log output

No response

Additional context

export ANDROID_HOME="$HOME/.android/sdk"
export ANDROID_SDK_ROOT="$HOME/.android/sdk"
export PATH=$PATH:$ANDROID_SDK_ROOT/tools; PATH=$PATH:$ANDROID_SDK_ROOT/platform-tools
@github-actions github-actions bot added area/cli bug/1-repro-available A reproduction is available and needs to be confirmed. flavour/quasar-cli-webpack labels Feb 6, 2022
@Teo27
Copy link

Teo27 commented Feb 8, 2022

Can confirm that I have the same issue.

This is applicable for both quasar build -m capacitor -T android --ide and quasar dev -m capacitor -T android.

On command execution, android studio does not open. Instead the folder where the capacitor project is placed is opened.

I tried with Android version 2020.3.1 Patch 3 and 2021.1.1 Patch 1. This does not seem to make a difference.

I did an upgrade from Quasar 2.0.4 to 2.5.1, which is when I noticed the issue.

Here is the quasar info output:

Operating System - Linux(5.13.0-28-generic) - linux/x64
NodeJs - 16.13.1

Global packages
  NPM - 8.1.2
  yarn - Not installed
  @quasar/cli - 1.2.2
  @quasar/icongenie - Not installed
  cordova - Not installed

Important local packages
  quasar - 2.5.1 -- Build high-performance VueJS user interfaces (SPA, PWA, SSR, Mobile and Desktop) in record time
  @quasar/app - 3.3.2 -- Quasar Framework local CLI
  @quasar/extras - 1.12.4 -- Quasar Framework fonts, icons and animations
  eslint-plugin-quasar - Not installed
  vue - 3.2.29 -- The progressive JavaScript framework for building modern web UI.
  vue-router - 4.0.12
  vuex - 4.0.2 -- state management for Vue.js
  electron - 15.3.6 -- Build cross platform desktop apps with JavaScript, HTML, and CSS
  electron-packager - 15.4.0 -- Customize and package your Electron app with OS-specific bundles (.app, .exe, etc.) via JS or CLI
  electron-builder - Not installed
  @babel/core - 7.16.12 -- Babel compiler core.
  webpack - 5.68.0 -- Packs CommonJs/AMD modules for the browser. Allows to split your codebase into multiple bundles, which can be loaded on demand. Support loaders to preprocess files, i.e. json, jsx, es7, css, less, ... and your custom stuff.
  webpack-dev-server - 4.7.3 -- Serves a webpack app. Updates the browser on changes.
  workbox-webpack-plugin - Not installed
  register-service-worker - 1.7.2 -- Script for registering service worker, with hooks
  typescript - 4.5.5 -- TypeScript is a language for application scale JavaScript development
  @capacitor/core - 3.3.3 -- Capacitor: Cross-platform apps with JavaScript and the web
  @capacitor/cli - 3.3.3 -- Capacitor: Cross-platform apps with JavaScript and the web
  @capacitor/android - 3.3.3 -- Capacitor: Cross-platform apps with JavaScript and the web
  @capacitor/ios - Not installed

Quasar App Extensions
  @quasar/quasar-app-extension-testing - 2.0.2 -- A Quasar App Extension for managing Test Harnesses
  @quasar/quasar-app-extension-testing-unit-jest - 3.0.0-alpha.8 -- A Quasar App Extension for running Jest tests

I have a slightly different Android path command, but it does essentially the same

export ANDROID_STUDIO_PATH=$([ -f ~/bin/studio ] && echo $(awk -F[\"\"] '{print $2}' ~/bin/studio ) || echo /snap/android-studio/current/android-studio/bin/studio.sh)

@francoism90
Copy link
Contributor Author

@Teo27 How do you build now using Android Studio?

@focarion
Copy link

I had the same problem and i fixed it by downgrading quasar/app to 3.2.9 and now its working, its probably something related to a new update on quasar/app

@Teo27
Copy link

Teo27 commented Feb 10, 2022

I am building android in the pipelines @francoism90

So the simplified version looks something like this:

First you build up the project but skip the gradlew part with the following command: npx quasar build -m capacitor -T android -s

Then, depending on your target and wanted result, you can use one of the following:
cd /src-capacitor/android/

  • ./gradlew assembleRelease
  • ./gradlew bundleRelease
  • ./gradlew assembleDebug
  • etc.

In case you are trying to do a release build, then you have to sign your app as well. You can check out how to do this on here f.x. https://developer.android.com/studio/build/building-cmdline#sign_cmdline

@francoism90
Copy link
Contributor Author

francoism90 commented Feb 10, 2022

I think something else is going on, maybe the gradle version is out-of-date?

After upgrading to the latest one (not recommended), it produces a working build.
Maybe the old one isn't compatible with the latest Android Studio?

@rstoenescu rstoenescu self-assigned this Feb 10, 2022
@Teo27
Copy link

Teo27 commented Feb 10, 2022

Ok, I found the exact issue. I debugged a bit and saw that both the target folder and studio path are correct for me. The issue is with the "open" library and specifically this commit for quasar - 6b977a8

In the file @quasar/app/lib/helpers/open-ide.js

On lines 68-72 it is as follows:

open(folder, {
        app: studioPath,
        wait: false
      })

It should be like this due to breaking changes going from [email protected] to [email protected]

open(folder, {
    app: {name: studioPath} ,
    wait: false
  })

The missing part is that app is an object requiring name attribute. That can be either the binary name or the path to the binary. In our case, this would be the ANDROID_STUDIO_PATH

@rstoenescu

@rstoenescu
Copy link
Member

@Teo27 Why not PR it? It helps as we have so much on our plate to handle and we love to see community contributions!

Fix will be available in "@quasar/app" v3.3.3

@wea141619
Copy link

I had the same problem and i fixed it by downgrading quasar/app to 3.2.9 and now its working, its probably something related to a new update on quasar/app

Hello, what is the command to downgrade the version of quasar my friend?

@rstoenescu
Copy link
Member

@wea141619 why downgrade? everything works fine now... Downgrading is a bad strategy for multiple reasons.
In any case, I'd suggest you do the exact opposite and run "quasar upgrade -i" instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/cli bug/1-repro-available A reproduction is available and needs to be confirmed. flavour/quasar-cli-webpack kind/bug 🐞 Qv2 🔝 Quasar v2 issues
Projects
None yet
Development

No branches or pull requests

5 participants