Unble to build apk andriod in ionic3


#1

error comes
D:\firebase-social-login (1)>ionic cordova build --release android
Running app-scripts build: --platform android --target cordova
[23:13:20] build dev started …
[23:13:20] clean started …
[23:13:20] clean finished in 6 ms
[23:13:20] copy started …
[23:13:20] deeplinks started …
[23:13:21] deeplinks finished in 49 ms
[23:13:21] transpile started …
[23:13:25] transpile finished in 4.63 s
[23:13:25] preprocess started …
[23:13:25] preprocess finished in 1 ms
[23:13:25] webpack started …
[23:13:25] copy finished in 4.82 s
[23:13:33] webpack finished in 7.36 s
[23:13:33] sass started …
Without from option PostCSS could generate wrong source map and will not find
Browserslist config. Set it to CSS file path or to undefined to prevent this w
arning.
[23:13:33] sass finished in 883 ms
[23:13:33] postprocess started …
[23:13:33] postprocess finished in 7 ms
[23:13:33] lint started …
[23:13:33] build dev finished in 13.09 s

cordova build android --release
Android Studio project detected

(node:6584) UnhandledPromiseRejectionWarning: Error: Source path does not exist:
resources/android/icon/drawable-hdpi-icon.png
at updatePathInternal (D:\firebase-social-login (1)\platforms\android\cordov
a\node_modules\cordova-common\src\FileUpdater.js:145:19)
at D:\firebase-social-login (1)\platforms\android\cordova\node_modules\cordo
va-common\src\FileUpdater.js:223:19
at Array.forEach ()
at Object.updatePaths (D:\firebase-social-login (1)\platforms\android\cordov
a\node_modules\cordova-common\src\FileUpdater.js:221:33)
at updateIcons (D:\firebase-social-login (1)\platforms\android\cordova\lib\p
repare.js:388:17)
at D:\firebase-social-login (1)\platforms\android\cordova\lib\prepare.js:49:
9
at _fulfilled (D:\firebase-social-login (1)\platforms\android\cordova\node_m
odules\q\q.js:854:54)
at self.promiseDispatch.done (D:\firebase-social-login (1)\platforms\android
\cordova\node_modules\q\q.js:883:30)
at Promise.promise.promiseDispatch (D:\firebase-social-login (1)\platforms\a
ndroid\cordova\node_modules\q\q.js:816:13)
at D:\firebase-social-login (1)\platforms\android\cordova\node_modules\q\q.j
s:624:44
(node:6584) 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:6584) [DEP0018] DeprecationWarning: Unhandled promise rejections are depre
cated. In the future, promise rejections that are not handled will terminate the
Node.js process with a non-zero exit code.
[23:13:37] lint finished in 3.33 s


#2

hello i have the same problem, who for help us??


#3

Add icon.png (minimum size 1024x1024) and splash.png (2732x2732) in resources folder and run “ionic cordova resources


#4

have you used promise??
because the err implies to that only.
You can clean build if needed.