[ 
https://issues.apache.org/jira/browse/CB-12546?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15928141#comment-15928141
 ] 

ASF GitHub Bot commented on CB-12546:
-------------------------------------

Github user filmaj commented on the issue:

    https://github.com/apache/cordova-android/pull/369
  
    @dpogue thanks for checking! So I think `android_sdk_version` failing in 
this case is kind of expected, as that script, historically, did not do any 
environment checking, and I tried keeping the same behaviour.
    
    The other commands that are part of `Api.js`, like `build` and `clean` and 
`run`, [always call through to 
`check_reqs`](https://github.com/apache/cordova-android/blob/master/bin/templates/cordova/Api.js#L344-L346).
 Part of that functionality in this pull request now [automatically adds the 
new SDK tools to your 
`PATH`](https://github.com/filmaj/cordova-android/blob/CB-12546/bin/templates/cordova/lib/check_reqs.js#L295-L297)
 if they are missing. That's why the `build` command worked for you, but the 
`android_sdk_version` command did not.
    
    We could tweak the behaviour of `android_sdk_version` so that it calls 
through to `check_reqs` as well? This change would fix that command failing in 
your case, and provide more meaningful errors for people who don't have their 
environments configured properly (i.e. will check for missing `ANDROID_HOME`, 
will munge `PATH` based on what kinds of Android tooling it will find, etc.). 
What do you think?
    
    The deeper question that rises out of this is: is `android_sdk_version` 
useful? Is it worth keeping around? It is not part of the platform API and is 
still hanging around due to history more than anything else.
    
    Let me know what y'all think.


> Latest Android SDK tools introduce bug w/ Android emulator
> ----------------------------------------------------------
>
>                 Key: CB-12546
>                 URL: https://issues.apache.org/jira/browse/CB-12546
>             Project: Apache Cordova
>          Issue Type: Improvement
>          Components: Android
>            Reporter: Filip Maj
>            Assignee: Filip Maj
>
> For details: https://code.google.com/p/android/issues/detail?id=235461
> A workaround is to change the current working directory to the directory 
> housing the {{emulator}} binary. E.g.:
> {noformat}
> ~ via ⬢ v6.9.4
> ➔ which emulator
> /Users/maj/sdks/android/tools/emulator
> ~ via ⬢ v6.9.4
> ➔ emulator -avd nexus5-5.1
> [140736778830784]:ERROR:./android/qt/qt_setup.cpp:28:Qt library not found at 
> ../emulator/lib64/qt/lib
> Could not launch '../emulator/qemu/darwin-x86_64/qemu-system-x86_64': No such 
> file or directory
> ~ via ⬢ v6.9.4
> ➔ cd ~/sdks/android/tools
> sdks/android/tools via ⬢ v6.9.4
> ➔ ./emulator -avd nexus5-5.1
> emulator: WARNING: encryption is off
> Hax is enabled
> Hax ram_size 0x80000000
> HAX is working and emulator runs in fast virt mode.
> {noformat}
> Potential fix: tweak the {{cordova run --emulator}} command to change the 
> current working directory to be the location of the emulator binary. That 
> might be an easy fix, as cordova uses the {{superspawn}} node module to kick 
> off the {{emulator}} process. That module takes an optional {{cwd}} parameter.
> Let's also check for the existence of {{android}} vs. {{sdkmanager}} to fix 
> the listing of images based on SDK version.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to