我正在尝试构建和离子2应用程序测试我的Android但我没有得到任何东西。
我的设置(离子信息):
Cordova CLI:5.1.1
Gulp版本:CLI版本3.9.1
Gulp local:
Ionic Framework版本:2.0.0-rc.0
Ionic CLI版本:2.1.0
Ionic App Lib版本:2.1.0-beta.1
操作系统:分销商ID:Ubuntu描述:Ubuntu 14.04.3 LTS
节点版本:v5.11.0
我的依赖项:
"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"
}
控制台消息是(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>_
但是,如果运行一个离子服务它完美无缺:
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 $
我尝试了很多,删除/添加平台,卸载/安装节点模块,使用nvm(4.4.0,5.11.0,5.6.0)构建另一个节点版本但没有任何作用。我认为它离子cli但不确定。
非常感谢
答案 0 :(得分:0)
我认为你应该使用以下命令:
$ionic platform remove android
$ionic hooks add
$ionic platform add android