diegonetto / generator-ionic

Build hybrid mobile apps using the Ionic Framework
MIT License
1.74k stars 336 forks source link

ionic build android #280

Open sofiane8819 opened 7 years ago

sofiane8819 commented 7 years ago

Hello everyone, i tried several times to create an app, but i had some problems cause i'm not a developer, i'm an ux designer.. so my problem when i tried to create the app i see this error ..

192:fp sofianeabsi$ ionic build android

Dependency warning - for the CLI to run correctly, it is highly recommended to install/upgrade the following:

Install ios-sim to deploy iOS applications.npm install -g ios-sim (may require sudo) Install ios-deploy to deploy iOS applications to devices. npm install -g ios-deploy (may require sudo)

Running command: /Users/sofianeabsi/desktop/fp/hooks/after_prepare/010_add_platform_class.js /Users/sofianeabsi/desktop/fp

add to body class: platform-android

Running command: /Users/sofianeabsi/desktop/fp/hooks/after_prepare/020_remove_sass_from_platforms.js /Users/sofianeabsi/desktop/fp

ANDROID_HOME=/Users/sofianeabsi/Library/Android/sdk

JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home

Subproject Path: CordovaLib

Error: spawn EACCES

so please can anyone could help me to solve it.. thanks for everyone

iagocavalcante commented 7 years ago

Hey @sofiane8819 , are you already added platform android in your project folder with the command "ionic platform add android" ?

sofiane8819 commented 7 years ago

Hello @iagocavalcante yes i did it, but still the same problem..

192:fp sofianeabsi$ ionic platform add android


Dependency warning - for the CLI to run correctly,
it is highly recommended to install/upgrade the following:

Install ios-sim to deploy iOS applications.npm install -g ios-sim (may require sudo) Install ios-deploy to deploy iOS applications to devices. npm install -g ios-deploy (may require sudo)


Running command: /Users/sofianeabsi/Desktop/fp/hooks/before_platform_add/init_directories.js /Users/sofianeabsi/Desktop/fp

Adding android project...

Creating Cordova project for the Android platform:

Path: platforms/android
Package: com.ionicframework.fp325344
Name: fp
Activity: MainActivity
Android target: android-25

Subproject Path: CordovaLib

Android project created with cordova-android@6.1.2

Installing "cordova-plugin-console" for android

Installing "cordova-plugin-device" for android

Installing "cordova-plugin-splashscreen" for android

Installing "cordova-plugin-statusbar" for android

Installing "cordova-plugin-whitelist" for android

           This plugin is only applicable for versions of cordova-android greater than 4.0. If you have a previous platform version, you do *not* need this plugin since the whitelist will be built in.

Installing "ionic-plugin-keyboard" for android

Running command: /Users/sofianeabsi/Desktop/fp/hooks/after_prepare/010_add_platform_class.js /Users/sofianeabsi/Desktop/fp

add to body class: platform-android

Running command: /Users/sofianeabsi/Desktop/fp/hooks/after_prepare/020_remove_sass_from_platforms.js /Users/sofianeabsi/Desktop/fp

Running command: /Users/sofianeabsi/Desktop/fp/hooks/after_platform_add/010_install_plugins.js /Users/sofianeabsi/Desktop/fp

(node:924) DeprecationWarning: sys is deprecated. Use util instead.

Plugin "cordova-plugin-device" already installed on android. Plugin "cordova-plugin-device" already installed on ios. Running command: /Users/sofianeabsi/Desktop/fp/hooks/after_plugin_add/010_register_plugin.js /Users/sofianeabsi/Desktop/fp

(node:924) DeprecationWarning: util.puts is deprecated. Use console.log instead.

Plugin "cordova-plugin-console" already installed on android. Plugin "cordova-plugin-console" already installed on ios. Running command: /Users/sofianeabsi/Desktop/fp/hooks/after_plugin_add/010_register_plugin.js /Users/sofianeabsi/Desktop/fp

Plugin "ionic-plugin-keyboard" already installed on android. Plugin "ionic-plugin-keyboard" already installed on ios. Running command: /Users/sofianeabsi/Desktop/fp/hooks/after_plugin_add/010_register_plugin.js /Users/sofianeabsi/Desktop/fp

Plugin "cordova-plugin-whitelist" already installed on android. Plugin "cordova-plugin-whitelist" already installed on ios. Running command: /Users/sofianeabsi/Desktop/fp/hooks/after_plugin_add/010_register_plugin.js /Users/sofianeabsi/Desktop/fp

Plugin "cordova-plugin-statusbar" already installed on android. Plugin "cordova-plugin-statusbar" already installed on ios. Running command: /Users/sofianeabsi/Desktop/fp/hooks/after_plugin_add/010_register_plugin.js /Users/sofianeabsi/Desktop/fp

Plugin "cordova-plugin-splashscreen" already installed on android. Plugin "cordova-plugin-splashscreen" already installed on ios. Running command: /Users/sofianeabsi/Desktop/fp/hooks/after_plugin_add/010_register_plugin.js /Users/sofianeabsi/Desktop/fp

192:fp sofianeabsi$ ionic build android


Dependency warning - for the CLI to run correctly,
it is highly recommended to install/upgrade the following:

Install ios-sim to deploy iOS applications.npm install -g ios-sim (may require sudo) Install ios-deploy to deploy iOS applications to devices. npm install -g ios-deploy (may require sudo)


Running command: /Users/sofianeabsi/Desktop/fp/hooks/after_prepare/010_add_platform_class.js /Users/sofianeabsi/Desktop/fp

add to body class: platform-android

Running command: /Users/sofianeabsi/Desktop/fp/hooks/after_prepare/020_remove_sass_from_platforms.js /Users/sofianeabsi/Desktop/fp

ANDROID_HOME=/Users/sofianeabsi/Library/Android/sdk

JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home

Subproject Path: CordovaLib

Error: spawn EACCES

iagocavalcante commented 7 years ago

Try to execute the command with sudo permission!

$sudo ionic build android

sofiane8819 commented 7 years ago

Thank you so much it work now :)