You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2020/03/11 19:43:23 UTC
[GitHub] [cordova-android] Mehditeranee opened a new issue #926: Android
emulator does not work
Mehditeranee opened a new issue #926: Android emulator does not work
URL: https://github.com/apache/cordova-android/issues/926
**Prerequisite**
- Android SDK is well installed (directory : /Users/gamecube/Library/Android/sdk)
**How to reproduce :**
1. Run this command : `cordova build android`
2. Run this command to launch android emulator : `cordova emulate android --verbose`
**Expected result**
The emulator is launched.
**Obtained result**
```
Command finished with error code 0: /Users/gamecube/Desktop/geocars/platforms/android/gradlew cdvBuildDebug,-b,/Users/gamecube/Desktop/geocars/platforms/android/build.gradle
Built the following apk(s):
/Users/gamecube/Desktop/geocars/platforms/android/app/build/outputs/apk/debug/app-debug.apk
No scripts found for hook "before_deploy".
Checking Java JDK and Android SDK versions
ANDROID_SDK_ROOT=undefined (recommended setting)
ANDROID_HOME=/Users/gamecube/Library/Android/sdk (DEPRECATED)
Running command: adb devices
Command finished with error code 0: adb devices
Could not find either `android` or `avdmanager` on your $PATH! Are you sure the Android SDK is installed and available?
CordovaError: Could not find either `android` or `avdmanager` on your $PATH! Are you sure the Android SDK is installed and available?
at /Users/gamecube/Desktop/geocars/platforms/android/cordova/lib/emulator.js:176:35
at processTicksAndRejections (internal/process/task_queues.js:97:5)
```
**My questions**
*Why Android Emulator does not work?*
and
*Why is there this error? :*
CordovaError: Could not find either `android` or `avdmanager` on your $PATH! Are you sure the Android SDK is installed and available?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[GitHub] [cordova-android] joaaogui edited a comment on issue #926: Android
emulator does not work
Posted by GitBox <gi...@apache.org>.
joaaogui edited a comment on issue #926: Android emulator does not work
URL: https://github.com/apache/cordova-android/issues/926#issuecomment-615901685
In my case the avdmanager was in C:\Users\\<user>\AppData\Local\Android\Sdk\cmdline-tools\latest\bin
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[GitHub] [cordova-android] Mehditeranee commented on issue #926: Android
emulator does not work
Posted by GitBox <gi...@apache.org>.
Mehditeranee commented on issue #926: Android emulator does not work
URL: https://github.com/apache/cordova-android/issues/926#issuecomment-597900281
I solved my problem.
**How did I do it?**
- I opened Android Studio, and went to the SDK Manager.

- I clicked on the SDK Tools tab, and in the list displayed, I checked: Android SDK Command-line Tools (latest)

- I then clicked on Apply (then OK on the pop-up) to download the package in question.
- I added the path of avdmanager to PATH in my .bash_profile as you explained @breautek
- I have run `source ~ / .bash_profile` to refresh
- And I launched my command: `cordova emulate android --verbose` successfully since the emulator has opened well.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[GitHub] [cordova-android] Mehditeranee edited a comment on issue #926:
Android emulator does not work
Posted by GitBox <gi...@apache.org>.
Mehditeranee edited a comment on issue #926: Android emulator does not work
URL: https://github.com/apache/cordova-android/issues/926#issuecomment-597882683
@breautek In my android-sdk folder (/[User]/Library/Android/sdk), I have these folders :
```
build-tools extras patcher platforms sources
emulator licenses platform-tools skins system-images
```
There is not the `tools` folder to which you are referring.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[GitHub] [cordova-android] Mehditeranee edited a comment on issue #926:
Android emulator does not work
Posted by GitBox <gi...@apache.org>.
Mehditeranee edited a comment on issue #926: Android emulator does not work
URL: https://github.com/apache/cordova-android/issues/926#issuecomment-597882683
@breautek In my android-sdk folder (/<user>/Library/Android/sdk), I have these folders :
```
build-tools extras patcher platforms sources
emulator licenses platform-tools skins system-images
```
There is not the `tools` folder to which you are referring.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[GitHub] [cordova-android] jamesjsewell edited a comment on issue #926:
Android emulator does not work
Posted by GitBox <gi...@apache.org>.
jamesjsewell edited a comment on issue #926: Android emulator does not work
URL: https://github.com/apache/cordova-android/issues/926#issuecomment-599597090
https://user-images.githubusercontent.com/38721898/76468468-518f5100-63ec-11ea-8370-0046553cc536.png when i was at this view, i had to click the "hide obsolete packages" checkbox, i was able to see SDK Tools. I installed SDK tools which is obsolete. Now the /tools folder appears in my Sdk folder. This solved the issue of "CordovaError: Could not find either `android` or `avdmanager` on your $PATH! Are you sure the Android SDK is installed and available?" for me
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[GitHub] [cordova-android] breautek commented on issue #926: Android
emulator does not work
Posted by GitBox <gi...@apache.org>.
breautek commented on issue #926: Android emulator does not work
URL: https://github.com/apache/cordova-android/issues/926#issuecomment-597929092
Interesting, Android SDK Command-line Tools appears to be new... I'll create a docs issue for this.
Since you've found your solution I'll close this issue but I'll link your comment in the docs issue.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[GitHub] [cordova-android] adhuliya commented on issue #926: Android
emulator does not work
Posted by GitBox <gi...@apache.org>.
adhuliya commented on issue #926: Android emulator does not work
URL: https://github.com/apache/cordova-android/issues/926#issuecomment-609984114
Please update this in the cordova tutorial/docs as well. This is the only place, that I could find on the web, that has the correct solution. All other places assume android sdk folder to have `tools/` directory when that seems to be deprecated in recent releases. This will save hours of futile search.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[GitHub] [cordova-android] Mehditeranee edited a comment on issue #926:
Android emulator does not work
Posted by GitBox <gi...@apache.org>.
Mehditeranee edited a comment on issue #926: Android emulator does not work
URL: https://github.com/apache/cordova-android/issues/926#issuecomment-597882683
@breautek In my android-sdk folder (/<user>/Library/Android/sdk), I have these folders :
```build-tools extras patcher platforms sources
emulator licenses platform-tools skins system-images```
There is not the `tools` folder to which you are referring.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[GitHub] [cordova-android] joaaogui edited a comment on issue #926: Android
emulator does not work
Posted by GitBox <gi...@apache.org>.
joaaogui edited a comment on issue #926: Android emulator does not work
URL: https://github.com/apache/cordova-android/issues/926#issuecomment-615901685
In my case the avdmanager was in \AppData\Local\Android\Sdk\cmdline-tools\latest\bin
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[GitHub] [cordova-android] Mehditeranee commented on issue #926: Android
emulator does not work
Posted by GitBox <gi...@apache.org>.
Mehditeranee commented on issue #926: Android emulator does not work
URL: https://github.com/apache/cordova-android/issues/926#issuecomment-597882683
@breautek In my android-sdk folder (/<user>/Library/Android/sdk), I have these folders :
`build-tools extras patcher platforms sources
emulator licenses platform-tools skins system-images`
There is not the `tools` folder to which you are referring.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[GitHub] [cordova-android] joaaogui commented on issue #926: Android
emulator does not work
Posted by GitBox <gi...@apache.org>.
joaaogui commented on issue #926: Android emulator does not work
URL: https://github.com/apache/cordova-android/issues/926#issuecomment-615901685
In my case the avdmanager was in C:\Users\<user>\AppData\Local\Android\Sdk\cmdline-tools\latest\bin
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[GitHub] [cordova-android] breautek closed issue #926: Android emulator does
not work
Posted by GitBox <gi...@apache.org>.
breautek closed issue #926: Android emulator does not work
URL: https://github.com/apache/cordova-android/issues/926
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[GitHub] [cordova-android] breautek commented on issue #926: Android
emulator does not work
Posted by GitBox <gi...@apache.org>.
breautek commented on issue #926: Android emulator does not work
URL: https://github.com/apache/cordova-android/issues/926#issuecomment-597835778
Cordova tries to guess some directories, but perhaps the directories it tries is out-dated.
The quick work around is to update your `PATH` environment variable to include the directory of `avdmanager`
I'm not sure if it is the same on windows, but on my system `android` is located
`<android-sdk>/tools/`
And `avdmanager`...
`<android-sdk>tools/bin/`
Ensure those paths are in your path (and remember to restart your terminal) and that should get you by. I'll leave this ticket open though so that cordova can maybe be smarter when looking for these executables.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org
[GitHub] [cordova-android] jamesjsewell commented on issue #926: Android
emulator does not work
Posted by GitBox <gi...@apache.org>.
jamesjsewell commented on issue #926: Android emulator does not work
URL: https://github.com/apache/cordova-android/issues/926#issuecomment-599597090
https://user-images.githubusercontent.com/38721898/76468468-518f5100-63ec-11ea-8370-0046553cc536.png when i was at this view, i had to click the "hide obsolete packages" checkbox, the i was able to see SDK Tools. I installed SDK tools which is obsolete. Now the /tools folder appears in my Sdk folder. This solved the issue of "CordovaError: Could not find either `android` or `avdmanager` on your $PATH! Are you sure the Android SDK is installed and available?" for me
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org