生成Ionic项目时出错-路径不存在:resources / android / icon / drawable-hdpi-icon.png

时间:2018-10-05 00:39:45

标签: ionic-framework ionic2 ionic3

大家好,我正在尝试构建我的Ionic应用程序,但出现以下错误,有人可以帮助我吗?谢谢(使用的命令:离子cordova构建android)

Installing "ionic-plugin-keyboard" for android

Discovered plugin "cordova-sqlite-storage" in config.xml. Adding it to the     project

Installing "cordova-sqlite-storage" for android

installing external dependencies via npm
npm install of external dependencies ok
(node:31485) UnhandledPromiseRejectionWarning: Error: Source path does not        exist: resources/android/icon/drawable-hdpi-icon.png
at updatePathInternal (/home/kill/Documents/iapp/ioo/ionic1/platforms/android/cordova/node_modules/cordova-common/src/FileUpdater.js:145:19)
at /home/kill/Documents/iapp/ioo/ionic1/platforms/android/cordova/node_modules/cordova-common/src/FileUpdater.js:223:19
at Array.forEach (<anonymous>)
at Object.updatePaths (/home/kill/Documents/iapp/ioo/ionic1/platforms/android/cordova/node_modules/cordova-common/src/FileUpdater.js:221:33)
at updateIcons (/home/kill/Documents/iapp/ioo/ionic1/platforms/android/cordova/lib/prepare.js:387:17)
at /home/kill/Documents/iapp/ioo/ionic1/platforms/android/cordova/lib/prepare.js:49:9
at _fulfilled (/home/kill/Documents/iapp/ioo/ionic1/platforms/android/cordova/node_modules/q/q.js:854:54)
at /home/kill/Documents/iapp/ioo/ionic1/platforms/android/cordova/node_modules/q/q.js:883:30
at Promise.promise.promiseDispatch (/home/kill/Documents/iapp/ioo/ionic1/platforms/android/cordova/node_modules/q/q.js:816:13)
at /home/kill/Documents/iapp/ioo/ionic1/platforms/android/cordova /node_modules/q/q.js:624:44
(node:31485) UnhandledPromiseRejectionWarning: Unhandled promise rejection.    This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:31485) [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.

1 个答案:

答案 0 :(得分:0)

运行ionic cordova resources如果不起作用,请进入资源文件夹,再删除iosandroid文件夹,然后运行ionic cordova resources并检查文件{{ icon.png中的1}}和splash.png没有损坏。