cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (CB-12677) `cordova requirements android` fails when Android Studio is in "Program Files" instead of "Program Files (x86)"
Date Thu, 20 Jul 2017 09:37:00 GMT


ASF GitHub Bot commented on CB-12677:

Github user russaa commented on the issue:
    I have to say, I like the current solution better (using `gradle` from Android Studio):
     1. you are not required to install something, that you may already have installed
     2. if you are building/debugging the Cordova app with Android Studio, you can be sure
that builds are same (as you are using the same version of `gradle`)
     3. users who prefer to install `gradle` separately still have this option
    If you want to get rid of the automatic-detection (because it may become cumbersome to
maintain) I would still like to have the option of using Android Studio's `gradle` by pointing
to its place via the env variable.   
    Its code should be fairly easy to maintain, since the user is responsible to specify the
correct path, i.e. the detection routine only needs to look into the env variable and does
not need to be adjusted to changing path structures etc. itself.  
    Although the mechanism then should maybe be changed, so that the env variable needs to
point the `gradle` directory directly, instead of the Android Studio directory (which it does
now), e.g. change the env variable to something like `GRADLE_HOME` and the path would need
to point, e.g. to the `gradle` sub-directory of the Android Studio directory.
    As an additional reason:  
    I assume the _"install `gradle` separately/as requirement"_ option also means, that you
must have `gradle` in your PATH env variable.
    On Windows, this is a concern for me, as the PATH variable has a maximum length -- which
I, for instance, are always about to exceed. So I try to not have paths there, if I can avoid

> `cordova requirements android` fails when Android Studio is in "Program Files" instead
of "Program Files (x86)"
> ---------------------------------------------------------------------------------------------------------------
>                 Key: CB-12677
>                 URL:
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: cordova-android
>    Affects Versions: 6.2.1
>         Environment: Windows 7, 64-bit
> Android Studio 2.3.1
> cordova 6.5.0
> cordova-android 6.2.1
>            Reporter: jakub-g
>              Labels: android-next
> See
> basically on my machine in `cordova/lib/check_reqs.js`:
> {code}
>         process.env['ProgramFiles'] === 'C:\\Program Files (x86)'
> {code}
> whereas I have android studio in `C:\Program Files` and I think I might not be the only
one with the same problem.
> In fact on my machine I have the following folders somehow:
> {code}
>     C:\Program Files\Android\Android Studio
>     C:\Program Files (x86)\Android\android-sdk
> {code}
> (The second folder is some leftovers from old installation, not used anymore; I keep
things in `D:\java\android\sdk` since quite a while)
> What would be a good fix in your opinion, other than checking both folders?

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message