Hello,
I just started playing around with an Ionic 2 app where I created an app using the blank template.
I installed Genymotion 2.7.2 and it downloaded Genymotion and Genymotion Shell.
I picked the 'Samsung Galaxy S6 - 5.0.0 API 21 - 1440x2560" and played the virtual device which opened in player and showed up as running in virutal box.
However, in Ionic CLI, once I enter the app folder and write
ionic run android, I get the following error:
Running ‘run:before’ gulp task before run
[21:54:12] Starting ‘clean’…
[21:54:12] Finished ‘clean’ after 38 ms
[21:54:12] Starting ‘build’…
[21:54:12] Starting ‘sass’…
[21:54:12] Starting ‘html’…
[21:54:12] Starting ‘fonts’…
[21:54:12] Starting ‘scripts’…
[21:54:12] Finished ‘html’ after 37 ms
[21:54:12] Finished ‘scripts’ after 46 ms
[21:54:12] Finished ‘fonts’ after 53 ms
[21:54:13] Finished ‘sass’ after 948 ms
[21:54:18] Finished ‘build’ after 6.48 s
[21:54:18] Starting ‘run:before’…
[21:54:18] Finished ‘run:before’ after 7.25 μs
Running command: /Users/Prasuna/cuteFungi2/hooks/after_prepare/010_add_platform_class.js /Users/Prasuna/cuteFungi2
add to body class: platform-android
ANDROID_HOME=/Users/Prasuna/Library/Android/sdk
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_31.jdk/Contents/Home
FAILURE:
Build failed with an exception.
- What went wrong:
A problem occurred configuring root project ‘android’.
failed to find target with hash string ‘android-23’ in: /Users/Prasuna/Library/Android/sdk
- Try:
Run with
–stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 1.106 secs
Error: /Users/Prasuna/cuteFungi2/platforms/android/gradlew: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.
- What went wrong:
A problem occurred configuring root project ‘android’.failed to find target with hash string ‘android-23’ in: /Users/Prasuna/Library/Android/sdk
- Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Please install Android target: “android-23”.
Hint: Open the SDK manager by running: /Users/Prasuna/Library/Android/sdk/tools/android
You will require:
- “SDK Platform” for android-23
- "Android SDK Platform-tools (latest)
- “Android SDK Build-tools” (latest)
All google search results say that as long as I’m running the virtual device and hit run, it should work so, I’m not sure what the problem is…
Thanks