Ionic Cordova build android strange error


#1

Hi!
I have got a problem. When I run ionic cordova build android in my project, I get a strange error:

$ ionic cordova build android
Running app-scripts build: --platform android --target cordova
[23:34:13]  build dev started ...
[23:34:13]  clean started ...
[23:34:13]  clean finished in 27 ms
[23:34:13]  copy started ...
[23:34:13]  deeplinks started ...
[23:34:13]  deeplinks finished in 23 ms
[23:34:13]  transpile started ...
[23:34:17]  transpile finished in 3.72 s
[23:34:17]  preprocess started ...
[23:34:17]  preprocess finished in less than 1 ms
[23:34:17]  webpack started ...
[23:34:17]  copy finished in 4.35 s
[23:34:22]  webpack finished in 5.42 s
[23:34:22]  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:34:23]  sass finished in 1.12 s
[23:34:23]  postprocess started ...
[23:34:23]  postprocess finished in 23 ms
[23:34:23]  lint started ...
[23:34:24]  build dev finished in 10.61 s
> cordova build android
Android Studio project detected

(node:15032) UnhandledPromiseRejectionWarning: TypeError: Cannot read property '                                                                                                                                                                                               manifest' of undefined
    at removeOldOptions (D:\Program Files\project\animacje\plugins\cordova-unive                                                                                                                                                                                               rsal-links-plugin\hooks\lib\android\manifestWriter.js:48:32)
    at Object.writePreferences (D:\Program Files\project\animacje\plugins\cordov                                                                                                                                                                                               a-universal-links-plugin\hooks\lib\android\manifestWriter.js:27:19)
    at activateUniversalLinksInAndroid (D:\Program Files\project\animacje\plugin                                                                                                                                                                                               s\cordova-universal-links-plugin\hooks\afterPrepareHook.js:65:25)
    at D:\Program Files\project\animacje\plugins\cordova-universal-links-plugin\                                                                                                                                                                                               hooks\afterPrepareHook.js:45:11
    at Array.forEach (<anonymous>)
    at run (D:\Program Files\project\animacje\plugins\cordova-universal-links-pl                                                                                                                                                                                               ugin\hooks\afterPrepareHook.js:41:17)
    at module.exports (D:\Program Files\project\animacje\plugins\cordova-univers                                                                                                                                                                                               al-links-plugin\hooks\afterPrepareHook.js:18:3)
    at runScriptViaModuleLoader (C:\Users\kubab\AppData\Roaming\npm\node_modules                                                                                                                                                                                               \cordova\node_modules\cordova-lib\src\hooks\HooksRunner.js:188:18)
    at runScript (C:\Users\kubab\AppData\Roaming\npm\node_modules\cordova\node_m                                                                                                                                                                                               odules\cordova-lib\src\hooks\HooksRunner.js:164:16)
    at C:\Users\kubab\AppData\Roaming\npm\node_modules\cordova\node_modules\cord                                                                                                                                                                                               ova-lib\src\hooks\HooksRunner.js:132:20
(node:15032) 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(). (rejectio                                                                                                                                                                                               n id: 1)
(node:15032) [DEP0018] DeprecationWarning: Unhandled promise rejections are depr                                                                                                                                                                                               ecated. In the future, promise rejections that are not handled will terminate th                                                                                                                                                                                               e Node.js process with a non-zero exit code.

Don’t know how to fix this. Anyone can help me?


#2

Hi I am getting the same error. I have created an Ionic project and I am trying to run in from android studio. I am trying to run the command “ionic cordova build android” and I am getting

Running app-scripts build: --platform android --target cordova
[11:32:45] build dev started …
[11:32:45] clean started …
[11:32:45] clean finished in 12 ms
[11:32:45] copy started …
[11:32:45] deeplinks started …
[11:32:45] deeplinks finished in 19 ms
[11:32:45] transpile started …
[11:32:50] transpile finished in 4.51 s
[11:32:50] preprocess started …
[11:32:50] preprocess finished in 1 ms
[11:32:50] webpack started …
[11:32:50] copy finished in 4.75 s
[11:32:57] webpack finished in 7.36 s
[11:32:57] 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 warning.
[11:32:59] sass finished in 1.39 s
[11:32:59] postprocess started …
[11:32:59] postprocess finished in 10 ms
[11:32:59] lint started …
[11:32:59] build dev finished in 13.47 s

cordova build android
Android Studio project detected

(node:13072) UnhandledPromiseRejectionWarning: TypeError: Cannot set property ‘text’ of null
at updateProjectAccordingTo (C:\wamp64\www\fcm_html\test-ionic\helloWorld\platforms\android\cordova\lib\prepare.js:174:51)
at C:\wamp64\www\fcm_html\test-ionic\helloWorld\platforms\android\cordova\lib\prepare.js:47:16
at _fulfilled (C:\wamp64\www\fcm_html\test-ionic\helloWorld\platforms\android\cordova\node_modules\q\q.js:854:54)
at self.promiseDispatch.done (C:\wamp64\www\fcm_html\test-ionic\helloWorld\platforms\android\cordova\node_modules\q\q.js:883:30)
at Promise.promise.promiseDispatch (C:\wamp64\www\fcm_html\test-ionic\helloWorld\platforms\android\cordova\node_modules\q\q.js:816:13)
at C:\wamp64\www\fcm_html\test-ionic\helloWorld\platforms\android\cordova\node_modules\q\q.js:570:49
at runSingle (C:\wamp64\www\fcm_html\test-ionic\helloWorld\platforms\android\cordova\node_modules\q\q.js:137:13)
at flush (C:\wamp64\www\fcm_html\test-ionic\helloWorld\platforms\android\cordova\node_modules\q\q.js:125:13)
at _combinedTickCallback (internal/process/next_tick.js:131:7)
at process._tickCallback (internal/process/next_tick.js:180:9)
(node:13072) 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:13072) [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.

[11:33:03] lint finished in 3.99 s