Reputation: 1450
im trying to build and ionic 2 app for test im my android but i dont get anything.
My setup (ionic info):
Cordova CLI: 5.1.1
Gulp version: CLI version 3.9.1
Gulp local:
Ionic Framework Version: 2.0.0-rc.0
Ionic CLI Version: 2.1.0
Ionic App Lib Version: 2.1.0-beta.1
OS: Distributor ID: Ubuntu Description: Ubuntu 14.04.3 LTS
Node Version: v5.11.0
My dependencies:
"dependencies": {
"@angular/common": "2.0.0",
"@angular/compiler": "2.0.0",
"@angular/compiler-cli": "0.6.2",
"@angular/core": "2.0.0",
"@angular/forms": "2.0.0",
"@angular/http": "2.0.0",
"@angular/platform-browser": "2.0.0",
"@angular/platform-browser-dynamic": "2.0.0",
"@angular/platform-server": "2.0.0",
"ionic-angular": "2.0.0-rc.0",
"ionicons": "3.0.0",
"@ionic/storage": "1.0.3",
"ionic-native": "2.0.3"
},
"devDependencies": {
"@ionic/app-scripts": "0.0.36",
"typescript": "2.0.3"
}
The console messages are (ionic build android):
Running 'build:before' npm script before build
> ionic-app-base@ build /home/fdom/repos/Pantrify
> ionic-app-scripts build
[15:38:53] ionic-app-scripts 0.0.36
[15:38:53] build prod started ...
[15:38:53] clean started ...
[15:38:53] clean finished in 9 ms
[15:38:53] copy started ...
[15:38:53] ngc started ...
[15:38:53] copy finished in 339 ms
[15:38:53] lint started ...
[15:38:56] lint finished in 2.52 s
[15:39:21] ngc finished in 28.49 s
[15:39:21] bundle started ...
[15:39:35] bundle finished in 13.74 s
[15:39:35] uglifyjs started ...
[15:39:35] sass started ...
[15:39:40] sass finished in 4.88 s
[15:39:40] cleancss started ...
[15:39:43] cleancss finished in 3.42 s
[15:39:52] uglifyjs finished in 16.86 s
[15:39:52] build prod finished in 59.12 s
prompt>_
But if a run a ionic serve it goes perfectly:
Running 'serve:before' npm script before serve
> ionic-app-base@ watch /home/fdom/repos/Pantrify
> ionic-app-scripts watch
[15:50:20] ionic-app-scripts 0.0.36
[15:50:20] watch started ...
[15:50:20] build dev started ...
[15:50:20] clean started ...
[15:50:20] clean finished in 6 ms
[15:50:20] copy started ...
[15:50:20] transpile started ...
[15:50:21] lint started ...
[15:50:23] lint finished in 2.46 s
[15:50:25] transpile finished in 4.69 s
[15:50:25] bundle started ...
[15:50:25] copy finished in 4.76 s
[15:50:36] bundle finished in 10.69 s
[15:50:36] sass started ...
[15:50:40] sass finished in 3.84 s
[15:50:40] build dev finished in 19.24 s
[15:50:40] watch ready in 19.57 s
Running live reload server: http://localhost:35729
Watching: www/**/*, !www/lib/**/*, !www/**/*.map
√ Running dev server: http://localhost:8100
Ionic server commands, enter:
restart or r to restart the client app from the root
goto or g and a url to have the app navigate to the given url
consolelogs or c to enable/disable console log output
serverlogs or s to enable/disable server log output
quit or q to shutdown the server and exit
ionic $
I tryed a lot, removing/adding platform, uninstaslling/installing node modules, build with another node version using nvm(4.4.0, 5.11.0, 5.6.0) but nothing works. I think its the ionic cli but not sure.
Thank you so much
Upvotes: 1
Views: 252
Reputation: 2478
I think you should use some below command:
$ionic platform remove android
$ionic hooks add
$ionic platform add android
Upvotes: 0