我启动了这个新项目,安装了我需要的所有插件。在浏览器中,它似乎可以正常工作。
当我跑的时候
ionic cordova build android
这是输出:
PS D:\Ionic\PigsNBulls\PigsNBulls> ionic cordova build android
> ionic-app-scripts build --target cordova --platform android
[20:21:27] ionic-app-scripts 3.2.0
[20:21:27] build dev started ...
[20:21:27] clean started ...
[20:21:27] clean finished in 16 ms
[20:21:27] copy started ...
[20:21:27] deeplinks started ...
[20:21:27] deeplinks finished in 111 ms
[20:21:27] transpile started ...
[20:21:31] transpile finished in 3.56 s
[20:21:31] preprocess started ...
[20:21:31] preprocess finished in 3 ms
[20:21:31] webpack started ...
[20:21:31] copy finished in 3.84 s
[20:21:36] webpack finished in 5.03 s
[20:21:36] sass started ...
[20:21:37] sass finished in 1.24 s
[20:21:37] postprocess started ...
[20:21:37] postprocess finished in 12 ms
[20:21:37] lint started ...
[20:21:37] build dev finished in 10.14 s
[20:21:40] lint finished in 3.12 s
> cordova build android
Android Studio project detected
(node:16624) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Invalid data, chunk must be a string or buffer, not object
(node:16624) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
PS D:\Ionic\PigsNBulls\PigsNBulls>
在这个新项目之前,一切都很顺利。