Problem with starting App


#1

Hi Guys!

I have a problem with starting my App, the build process interupts due to depricated Android-API,
but I don’t know why… I have installed all requiered Android-APIs, build-tools, etc. which I need, and of course ANT & JDK

Here is the copied output from my console:

D:\>cd Testapp_Ionic

D:\Testapp_Ionic>ionic run android
Running command: D:\nodejs\node.exe D:\Testapp_Ionic\hooks\after_prepare\010_add
_platform_class.js D:\Testapp_Ionic
add to body class: platform-android
Running command: D:\nodejs\node.exe D:\Testapp_Ionic\hooks\after_prepare\020_rem
ove_sass_from_platforms.js D:\Testapp_Ionic
Running command: D:\Testapp_Ionic\platforms\android\cordova\run.bat
WARNING : No target specified, deploying to device '5205816c4da591ae'.
Buildfile: D:\Testapp_Ionic\platforms\android\build.xml

-set-mode-check:

-set-debug-files:

-check-env:
 [checkenv] Android SDK Tools Revision 24.0.2
 [checkenv] Installed at D:\Android\android-sdk

-setup:
     [echo] Project Name: MainActivity
  [gettype] Project Type: Application

-set-debug-mode:

-debug-obfuscation-check:

-pre-build:

-build-setup:
[getbuildtools] Using latest Build Tools: 22.0.0
     [echo] Resolving Build Target for MainActivity...
[gettarget] Project Target:   Android 4.4.2
[gettarget] API level:        19
     [echo] ----------
     [echo] Creating output directories if needed...
     [echo] ----------
     [echo] Resolving Dependencies for MainActivity...
[dependency] Library dependencies:
[dependency]
[dependency] ------------------
[dependency] Ordered libraries:
[dependency]
[dependency] ------------------
     [echo] ----------
     [echo] Building Libraries with 'debug'...

nodeps:

-set-mode-check:

-set-debug-files:

-check-env:
 [checkenv] Android SDK Tools Revision 24.0.2
 [checkenv] Installed at D:\Android\android-sdk

-setup:
     [echo] Project Name: MainActivity
  [gettype] Project Type: Android Library

-set-debug-mode:

-debug-obfuscation-check:

-pre-build:

-build-setup:
[getbuildtools] Using latest Build Tools: 22.0.0
     [echo] Resolving Build Target for MainActivity...
[gettarget] Project Target:   Android 4.4.2
[gettarget] API level:        19
     [echo] ----------
     [echo] Creating output directories if needed...
    [mkdir] Created dir: D:\Testapp_Ionic\platforms\android\CordovaLib\ant-build
\rsObj
    [mkdir] Created dir: D:\Testapp_Ionic\platforms\android\CordovaLib\ant-build
\rsLibs
     [echo] ----------
     [echo] Resolving Dependencies for MainActivity...
[dependency] Library dependencies:
[dependency] No Libraries
[dependency]
[dependency] ------------------

-code-gen:
[mergemanifest] Found Deleted Target File
[mergemanifest] Merging AndroidManifest files into one.
[mergemanifest] Manifest merger disabled. Using project manifest only.
     [echo] Handling aidl files...
     [aidl] No AIDL files to compile.
     [echo] ----------
     [echo] Handling RenderScript files...
     [echo] ----------
     [echo] Handling Resources...
     [aapt] Found new input file
     [aapt] Generating resource IDs...
     [echo] ----------
     [echo] Handling BuildConfig class...
[buildconfig] Generating BuildConfig class.

-pre-compile:

-compile:
    [javac] Compiling 98 source files to D:\Testapp_Ionic\platforms\android\Cord
ovaLib\ant-build\classes
    [javac] warning: [options] source value 1.5 is obsolete and will be removed
in a future release
    [javac] warning: [options] target value 1.5 is obsolete and will be removed
in a future release
    [javac] warning: [options] To suppress warnings about obsolete options, use
-Xlint:-options.
    [javac] D:\Testapp_Ionic\platforms\android\CordovaLib\src\org\apache\cordova
\CordovaWebViewClient.java:35: error: cannot find symbol
    [javac] import android.webkit.ClientCertRequest;
    [javac]                      ^
    [javac]   symbol:   class ClientCertRequest
    [javac]   location: package android.webkit
    [javac] D:\Testapp_Ionic\platforms\android\CordovaLib\src\org\apache\cordova
\CordovaWebViewClient.java:145: error: cannot find symbol
    [javac]     public void onReceivedClientCertRequest (WebView view, ClientCer
tRequest request)
    [javac]                                                            ^
    [javac]   symbol:   class ClientCertRequest
    [javac]   location: class CordovaWebViewClient
    [javac] D:\Testapp_Ionic\platforms\android\CordovaLib\src\org\apache\cordova
\CordovaChromeClient.java:342: error: cannot find symbol
    [javac]     public boolean onShowFileChooser(WebView webView, final ValueCal
lback<Uri[]> filePathsCallback, final WebChromeClient.FileChooserParams fileChoo
serParams) {
    [javac]
                                                     ^
    [javac]   symbol:   class FileChooserParams
    [javac]   location: class WebChromeClient
    [javac] D:\Testapp_Ionic\platforms\android\CordovaLib\src\org\apache\cordova
\CordovaClientCertRequest.java:25: error: cannot find symbol
    [javac] import android.webkit.ClientCertRequest;
    [javac]                      ^
    [javac]   symbol:   class ClientCertRequest
    [javac]   location: package android.webkit
    [javac] D:\Testapp_Ionic\platforms\android\CordovaLib\src\org\apache\cordova
\CordovaClientCertRequest.java:32: error: cannot find symbol
    [javac]     private final ClientCertRequest request;
    [javac]                   ^
    [javac]   symbol:   class ClientCertRequest
    [javac]   location: class CordovaClientCertRequest
    [javac] D:\Testapp_Ionic\platforms\android\CordovaLib\src\org\apache\cordova
\CordovaClientCertRequest.java:34: error: cannot find symbol
    [javac]     public CordovaClientCertRequest(ClientCertRequest request) {
    [javac]                                     ^
    [javac]   symbol:   class ClientCertRequest
    [javac]   location: class CordovaClientCertRequest
    [javac] D:\Testapp_Ionic\platforms\android\CordovaLib\src\org\apache\cordova
\CordovaChromeClient.java:340: error: cannot find symbol
    [javac]     @TargetApi(Build.VERSION_CODES.LOLLIPOP)
    [javac]                                   ^
    [javac]   symbol:   variable LOLLIPOP
    [javac]   location: class VERSION_CODES
    [javac] D:\Testapp_Ionic\platforms\android\CordovaLib\src\org\apache\cordova
\CordovaWebView.java:197: error: cannot find symbol
    [javac]         if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP)
    [javac]                                                        ^
    [javac]   symbol:   variable LOLLIPOP
    [javac]   location: class VERSION_CODES
    [javac] D:\Testapp_Ionic\platforms\android\CordovaLib\src\org\apache\cordova
\CordovaWebView.java:200: error: cannot find symbol
    [javac]             cookieManager.setAcceptThirdPartyCookies(this, true);
    [javac]                          ^
    [javac]   symbol:   method setAcceptThirdPartyCookies(CordovaWebView,boolean
)
    [javac]   location: variable cookieManager of type CookieManager
    [javac] D:\Testapp_Ionic\platforms\android\CordovaLib\src\org\apache\cordova
\CordovaWebViewClient.java:143: error: method does not override or implement a m
ethod from a supertype
    [javac]     @Override
    [javac]     ^
    [javac] D:\Testapp_Ionic\platforms\android\CordovaLib\src\org\apache\cordova
\CordovaChromeClient.java:341: error: method does not override or implement a me
thod from a supertype
    [javac]     @Override
    [javac]     ^
    [javac] D:\Testapp_Ionic\platforms\android\CordovaLib\src\org\apache\cordova
\CordovaChromeClient.java:348: error: cannot find symbol
    [javac]                     Uri[] result = WebChromeClient.FileChooserParams
.parseResult(resultCode, intent);
    [javac]                                                   ^
    [javac]   symbol:   variable FileChooserParams
    [javac]   location: class WebChromeClient
    [javac] Note: Some input files use or override a deprecated API.
    [javac] Note: Recompile with -Xlint:deprecation for details.
    [javac] 12 errors
    [javac] 3 warnings

BUILD FAILED
D:\Android\android-sdk\tools\ant\build.xml:601: The following error occurred whi
le executing this line:
D:\Android\android-sdk\tools\ant\build.xml:720: The following error occurred whi
le executing this line:
D:\Android\android-sdk\tools\ant\build.xml:734: Compile failed; see the compiler
 error output for details.

Total time: 2 seconds

D:\Testapp_Ionic\platforms\android\cordova\node_modules\q\q.js:126
                    throw e;
                          ^
Error code 1 for command: cmd with args: /s /c "ant debug -f D:\Testapp_Ionic\pl
atforms\android\build.xml -Dout.dir=ant-build -Dgen.absolute.dir=ant-gen"
ERROR running one or more of the platforms: Error: D:\Testapp_Ionic\platforms\an
droid\cordova\run.bat: Command failed with exit code 1
You may not have the required environment or OS to run this project

D:\Testapp_Ionic>ionic info

Your system information:

OS: Windows 7 SP1
Node Version: v0.12.0
Cordova CLI: 4.3.0
Ionic Version: 1.0.0-rc.1
Ionic CLI Version: 1.3.14

THANK YOU FOR YOUR HELP :slight_smile:


#2

Have you added the plateform ?

  ionic platform add android

#3

yes i’ve added it… :confused:
I watched the tutorials to install it, but at the point “run android” everthing broke down xD


#4

Ok !

And try build, Just to see :

ionic build android

#5

You need android api level 21 for ionic rc1.


#6

But I want to develop for Api 16 to 19!!!
I’ve installed Android API Level 22, for some reason i can’t install Level 21…


#7

here is the output… (I created a new App “myApp” as in the Instructions)

D:\myApp>ionic info

Your system information:
OS: Windows 8.1
Node Version: v0.12.1
Cordova CLI: 4.3.0
Ionic Version: 1.0.0-rc.1
Ionic CLI Version: 1.3.17

D:\myApp>ionic platform add android
Downloading Default Ionic Resources
Downloading: https://github.com/driftyco/ionic-default-resources/archive/master.zip
[=============================]  100%  0.0s
Done adding default Ionic resources
Adding icons for platform: android
Running command: "C:\Program Files\nodejs\node.exe" D:\myApp\hooks\before_platfo
rm_add\init_directories.js D:\myApp
npm http GET https://registry.npmjs.org/cordova-android/3.7.1
npm http 304 https://registry.npmjs.org/cordova-android/3.7.1
Platform android already added.
D:\myApp>ionic platform
No platform specified. Please specify a platform to add. See `cordova platform list`.
D:\myApp>cordova platform list
Installed platforms: android 3.7.1
Available platforms: amazon-fireos, blackberry10, browser, firefoxos, windows, windows8, wp8

#8

and here the build command

D:\myApp>ionic build android
Running command: "C:\Program Files\nodejs\node.exe" D:\myApp\hooks\after_prepare
\010_add_platform_class.js D:\myApp
add to body class: platform-android
Running command: "C:\Program Files\nodejs\node.exe" D:\myApp\hooks\after_prepare
\020_remove_sass_from_platforms.js D:\myApp
Running command: D:\myApp\platforms\android\cordova\build.bat
Buildfile: D:\myApp\platforms\android\build.xml
-set-mode-check:
-set-debug-files:
-check-env:
 [checkenv] Android SDK Tools Revision 24.1.2
 [checkenv] Installed at C:\Program Files\Android\android-sdk
-setup:
     [echo] Project Name: MainActivity
  [gettype] Project Type: Application
-set-debug-mode:
-debug-obfuscation-check:
-pre-build:
-build-setup:
[getbuildtools] Using latest Build Tools: 22.0.0
     [echo] Resolving Build Target for MainActivity...
[gettarget] Project Target:   Android 4.1.2
[gettarget] API level:        16
     [echo] ----------
     [echo] Creating output directories if needed...
    [mkdir] Created dir: D:\myApp\platforms\android\ant-build\rsObj
    [mkdir] Created dir: D:\myApp\platforms\android\ant-build\rsLibs
     [echo] ----------
     [echo] Resolving Dependencies for MainActivity...
[dependency] Library dependencies:
[dependency]
[dependency] ------------------
[dependency] Ordered libraries:
[dependency]
[dependency] ------------------
     [echo] ----------
     [echo] Building Libraries with 'debug'...
nodeps:
-set-mode-check:
-set-debug-files:
-check-env:
 [checkenv] Android SDK Tools Revision 24.1.2
 [checkenv] Installed at C:\Program Files\Android\android-sdk
-setup:
     [echo] Project Name: MainActivity
  [gettype] Project Type: Application
-set-debug-mode:
-debug-obfuscation-check:
-pre-build:
-build-setup:
[getbuildtools] Using latest Build Tools: 22.0.0
     [echo] Resolving Build Target for MainActivity...
[gettarget] Project Target:   Android 4.1.2
[gettarget] API level:        16
     [echo] ----------
     [echo] Creating output directories if needed...
     [echo] ----------
     [echo] Resolving Dependencies for MainActivity...
[dependency] Library dependencies:
[dependency] No Libraries
[dependency]
[dependency] ------------------
-code-gen:
[mergemanifest] Found Deleted Target File
[mergemanifest] Merging AndroidManifest files into one.
[mergemanifest] Manifest merger disabled. Using project manifest only.
     [echo] Handling aidl files...
     [aidl] No AIDL files to compile.
     [echo] ----------
     [echo] Handling RenderScript files...
     [echo] ----------
     [echo] Handling Resources...
     [aapt] Found new input file
     [aapt] Generating resource IDs...
     [echo] ----------
     [echo] Handling BuildConfig class...
[buildconfig] No need to generate new BuildConfig.
-pre-compile:
-compile:
-post-compile:
-obfuscate:
-dex:
      [dex] input: D:\myApp\platforms\android\CordovaLib\ant-build\classes
      [dex] Found Deleted Target File
      [dex] Converting compiled files and external libraries into D:\myApp\platf
orms\android\CordovaLib\ant-build\classes.dex...
-crunch:
   [crunch] Crunching PNG Files in source dir: D:\myApp\platforms\android\Cordov
aLib\res
   [crunch] To destination dir: D:\myApp\platforms\android\CordovaLib\ant-build\
res
   [crunch] Crunched 0 PNG files to update cache
-package-resources:
     [aapt] Found Deleted Target File
     [aapt] Creating full resource package...
-package:
[apkbuilder] Found Deleted Target File
[apkbuilder] Creating MainActivity-debug-unaligned.apk and signing it with a deb
ug key...
-post-package:
-do-debug:
 [zipalign] Running zip align on final apk...
     [echo] Debug Package: D:\myApp\platforms\android\CordovaLib\ant-build\MainA
ctivity-debug.apk
[propertyfile] Updating property file: D:\myApp\platforms\android\CordovaLib\ant
-build\build.prop
[propertyfile] Updating property file: D:\myApp\platforms\android\CordovaLib\ant
-build\build.prop
[propertyfile] Updating property file: D:\myApp\platforms\android\CordovaLib\ant
-build\build.prop
[propertyfile] Updating property file: D:\myApp\platforms\android\CordovaLib\ant
-build\build.prop
-post-build:
debug:
-code-gen:
[mergemanifest] Found Deleted Target File
[mergemanifest] Merging AndroidManifest files into one.
[mergemanifest] Manifest merger disabled. Using project manifest only.
     [echo] Handling aidl files...
     [aidl] No AIDL files to compile.
     [echo] ----------
     [echo] Handling RenderScript files...
     [echo] ----------
     [echo] Handling Resources...
     [aapt] Found Deleted Target File
     [aapt] Generating resource IDs...
     [aapt] D:\myApp\platforms\android\ant-build\AndroidManifest.xml:5: error: N
o resource identifier found for attribute 'supportsRtl' in package 'android'
     [aapt]
BUILD FAILED
C:\Program Files\Android\android-sdk\tools\ant\build.xml:653: The following erro
r occurred while executing this line:
C:\Program Files\Android\android-sdk\tools\ant\build.xml:698: null returned: 1
Total time: 6 seconds
D:\myApp\platforms\android\cordova\node_modules\q\q.js:126
                    throw e;
                          ^
Error code 1 for command: cmd with args: /s /c "ant debug -f D:\myApp\platforms\
android\build.xml -Dout.dir=ant-build -Dgen.absolute.dir=ant-gen"
ERROR building one of the platforms: Error: D:\myApp\platforms\android\cordova\b
uild.bat: Command failed with exit code 1
You may not have the required environment or OS to build this project
Error: D:\myApp\platforms\android\cordova\build.bat: Command failed with exit co
de 1
    at ChildProcess.whenDone (C:\Users\Daniel\AppData\Roaming\npm\node_modules\c
ordova\node_modules\cordova-lib\src\cordova\superspawn.js:131:23)
    at ChildProcess.emit (events.js:110:17)
    at maybeClose (child_process.js:1008:16)
    at Process.ChildProcess._handle.onexit (child_process.js:1080:5)
D:\myApp>

#9

Maybe it’s a problem with jre version, what version do you have installed? If you haven’t the last jre version, try to install it and try again…


#10

jupp… i do uninstall everthing, and try it again xD


#11

Everthing fine now… i must did a mistake during my first try…
Now it works fine :smile:


#12

@danny1986 What have you done to solve this issue? I’m facing what I think is the same problem here.

Leonardos-Air:pubclub-ionic-user leo$ ionic build android
Updated the hooks directory to have execute permissions
running cordova build android
Running command: /Users/leo/Documents/pubclub-ionic-user/hooks/after_prepare/010_add_platform_class.js /Users/leo/Documents/pubclub-ionic-user
add to body class: platform-android
Running command: /Users/leo/Documents/pubclub-ionic-user/platforms/android/cordova/build 
ANDROID_HOME=/Users/leo/Library/Android/sdk
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_25.jdk/Contents/Home
Running: /Users/leo/Documents/pubclub-ionic-user/platforms/android/gradlew cdvBuildDebug -b /Users/leo/Documents/pubclub-ionic-user/platforms/android/build.gradle -Dorg.gradle.daemon=true
:preBuild
:compileDebugNdk
:preDebugBuild
:checkDebugManifest
:CordovaLib:compileLint
:CordovaLib:copyDebugLint UP-TO-DATE
:CordovaLib:mergeDebugProguardFiles
:CordovaLib:preBuild
:CordovaLib:preDebugBuild
:CordovaLib:checkDebugManifest
:CordovaLib:prepareDebugDependencies
:CordovaLib:compileDebugAidl
:CordovaLib:compileDebugRenderscript
:CordovaLib:generateDebugBuildConfig
:CordovaLib:generateDebugAssets UP-TO-DATE
:CordovaLib:mergeDebugAssets
:CordovaLib:generateDebugResValues
:CordovaLib:generateDebugResources
:CordovaLib:packageDebugResources
:CordovaLib:processDebugManifest
:CordovaLib:processDebugResources
:CordovaLib:generateDebugSources
:CordovaLib:compileDebugJava/Users/leo/Documents/pubclub-ionic-user/platforms/android/CordovaLib/src/org/apache/cordova/CordovaClientCertRequest.java:25: error: cannot find symbol
import android.webkit.ClientCertRequest;
                     ^
  symbol:   class ClientCertRequest
  location: package android.webkit
/Users/leo/Documents/pubclub-ionic-user/platforms/android/CordovaLib/src/org/apache/cordova/CordovaClientCertRequest.java:32: error: cannot find symbol
    private final ClientCertRequest request;
                  ^
  symbol:   class ClientCertRequest
  location: class CordovaClientCertRequest
/Users/leo/Documents/pubclub-ionic-user/platforms/android/CordovaLib/src/org/apache/cordova/CordovaClientCertRequest.java:34: error: cannot find symbol
    public CordovaClientCertRequest(ClientCertRequest request) {
                                    ^
  symbol:   class ClientCertRequest
  location: class CordovaClientCertRequest
/Users/leo/Documents/pubclub-ionic-user/platforms/android/CordovaLib/src/org/apache/cordova/engine/SystemWebChromeClient.java:251: error: cannot find symbol
    public boolean onShowFileChooser(WebView webView, final ValueCallback<Uri[]> filePathsCallback, final WebChromeClient.FileChooserParams fileChooserParams) {
                                                                                                                         ^
  symbol:   class FileChooserParams
  location: class WebChromeClient
/Users/leo/Documents/pubclub-ionic-user/platforms/android/CordovaLib/src/org/apache/cordova/engine/SystemWebViewClient.java:29: error: cannot find symbol
import android.webkit.ClientCertRequest;
                     ^
  symbol:   class ClientCertRequest
  location: package android.webkit
/Users/leo/Documents/pubclub-ionic-user/platforms/android/CordovaLib/src/org/apache/cordova/engine/SystemWebViewClient.java:116: error: cannot find symbol
    public void onReceivedClientCertRequest (WebView view, ClientCertRequest request)
                                                           ^
  symbol:   class ClientCertRequest
  location: class SystemWebViewClient
/Users/leo/Documents/pubclub-ionic-user/platforms/android/CordovaLib/src/org/apache/cordova/engine/SystemWebChromeClient.java:249: error: cannot find symbol
    @TargetApi(Build.VERSION_CODES.LOLLIPOP)
                                  ^
  symbol:   variable LOLLIPOP
  location: class VERSION_CODES
/Users/leo/Documents/pubclub-ionic-user/platforms/android/CordovaLib/src/org/apache/cordova/engine/SystemCookieManager.java:37: error: cannot find symbol
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
                                                        ^
  symbol:   variable LOLLIPOP
  location: class VERSION_CODES
/Users/leo/Documents/pubclub-ionic-user/platforms/android/CordovaLib/src/org/apache/cordova/engine/SystemCookieManager.java:38: error: cannot find symbol
            cookieManager.setAcceptThirdPartyCookies(webView, true);
                         ^
  symbol:   method setAcceptThirdPartyCookies(WebView,boolean)
  location: variable cookieManager of type CookieManager
/Users/leo/Documents/pubclub-ionic-user/platforms/android/CordovaLib/src/org/apache/cordova/engine/SystemCookieManager.java:59: error: cannot find symbol
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
                                                        ^
  symbol:   variable LOLLIPOP
  location: class VERSION_CODES
/Users/leo/Documents/pubclub-ionic-user/platforms/android/CordovaLib/src/org/apache/cordova/engine/SystemCookieManager.java:60: error: cannot find symbol
            cookieManager.flush();
                         ^
  symbol:   method flush()
  location: variable cookieManager of type CookieManager
/Users/leo/Documents/pubclub-ionic-user/platforms/android/CordovaLib/src/org/apache/cordova/engine/SystemWebChromeClient.java:250: error: method does not override or implement a method from a supertype
    @Override
    ^
/Users/leo/Documents/pubclub-ionic-user/platforms/android/CordovaLib/src/org/apache/cordova/engine/SystemWebChromeClient.java:257: error: cannot find symbol
                    Uri[] result = WebChromeClient.FileChooserParams.parseResult(resultCode, intent);
                                                  ^
  symbol:   variable FileChooserParams
  location: class WebChromeClient
/Users/leo/Documents/pubclub-ionic-user/platforms/android/CordovaLib/src/org/apache/cordova/engine/SystemWebViewClient.java:114: error: method does not override or implement a method from a supertype
    @Override
    ^
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
14 errors
 FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':CordovaLib:compileDebugJava'.
> Compilation failed; see the compiler error output for details.

* 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: 36.866 secs

/Users/leo/Documents/pubclub-ionic-user/platforms/android/cordova/node_modules/q/q.js:126
                    throw e;
                          ^
Error code 1 for command: /Users/leo/Documents/pubclub-ionic-user/platforms/android/gradlew with args: cdvBuildDebug,-b,/Users/leo/Documents/pubclub-ionic-user/platforms/android/build.gradle,-Dorg.gradle.daemon=true
ERROR building one of the platforms: Error: /Users/leo/Documents/pubclub-ionic-user/platforms/android/cordova/build: Command failed with exit code 1
You may not have the required environment or OS to build this project
Error: /Users/leo/Documents/pubclub-ionic-user/platforms/android/cordova/build: Command failed with exit code 1
    at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:131:23)
    at ChildProcess.emit (events.js:110:17)
    at maybeClose (child_process.js:1015:16)
    at Process.ChildProcess._handle.onexit (child_process.js:1087:5)


Leonardos-Air:pubclub-ionic-user leo$ ionic info

Your system information:

OS: Mac OS X Yosemite
Node Version: v0.12.2
Cordova CLI: 5.0.0
Ionic Version: 1.0.0-rc.5
Ionic CLI Version: 1.3.22
Xcode version: Xcode 6.3.1 Build version 6D1002 
ios-sim version: 3.1.1 
ios-deploy version: Not installed

#13

@lmaranhao: have you resolved your problem? I’m in identical situation. Thanks.

M.


#14

Just worked through this today. At some point I had removed a few Cordova modules, but some trace of them must have been hanging around the platforms directory.

The fix (for me) was to delete the entire /platforms/ directory, then rerun ionic platform add android and ionic build android, which now run properly.

Through this troubleshooting process, I also installed a handful of Android API levels (22, 21, 20, 19), installed Node Version Manager and upgraded from Node 0.10.32 to 0.12.4

Something interesting for comparison - when I run ionic build android the debug output indicates that my project target is Android 4.4.2, API level 19. Not sure how or where this is configured (probably Android Studio), but @danny1986 it does compile at this level!


#15

Had the same problem, I’ve tried upgrading Cordova and Ionic, but to no avail. Simply deleting the platforms/android directory and adding the android platform again solved it directly.


#16

I’m having the same problem.

also multiple times this warning:
warning: java/lang/Object.class(java/lang:Object.class): major version 51 is newer than 50, the highest major version supported by this compiler.
It is recommended that the compiler be upgraded.

Any ideas?

I have tried to delete platforms/android and add it again.

FIXED:
I had android-23 (i modified project files 22 -> 23) and when i installed 22, everything worked