我的ionic 3项目在ionic cordova run android
下运行良好;但是,如果我添加了--prod
标志,即ionic cordova run android --prod
,该进程将挂起,没有任何错误。以下是停止的地方:
$ ionic cordova run android --prod
Running app-scripts build: --prod --platform android --target cordova
[23:16:47] build prod started ...
[23:16:47] clean started ...
[23:16:47] clean finished in 8 ms
[23:16:47] copy started ...
[23:16:47] deeplinks started ...
[23:16:47] deeplinks finished in 528 ms
[23:16:47] ngc started ...
[23:17:01] ngc finished in 13.21 s
[23:17:01] preprocess started ...
[23:17:01] preprocess finished in 1 ms
[23:17:01] webpack started ...
[23:17:01] copy finished in 14.49 s
这里永远停下来...
我多次重试,结果相同。以下是我的离子信息:
$ ionic info
cli packages: (C:\Users\user\AppData\Roaming\npm\node_modules)
@ionic/cli-utils : 1.19.2
ionic (Ionic CLI) : 3.20.0
global packages:
cordova (Cordova CLI) : 8.0.0
local packages:
@ionic/app-scripts : 3.1.8
Cordova Platforms : android 7.1.0
Ionic Framework : ionic-angular 3.9.2
System:
Android SDK Tools : 25.2.5
Node : v8.11.2
npm : 5.6.0
OS : Windows 10
Environment Variables:
ANDROID_HOME : C:\Android\android-sdk
Misc:
backend : pro
请帮助!谢谢...
答案 0 :(得分:1)
尝试命令
ionic cordova build android --prod --release
答案 1 :(得分:0)
任何仍然有此问题的人,导致此问题的主要原因是插件
运行printer.print(resultSet.getString(column).replace(":", "\":"));
查看一下您的插件列表,然后卸载所有狡猾的插件,以及您肯定不能通过运行ionic cordova plugin
这是98%的问题。