Ionic3 is giving error while installing app in android device

this error for installing app on device,
when i run ionic cordova run android is giving error.

cordova run android
(node:12452) UnhandledPromiseRejectionWarning: TypeError: Cannot read property ‘replace’ of null
at updateProjectAccordingTo (F:\IndiansInCA\platforms\android\cordova\lib\prepare.js:174:58)
at F:\IndiansInCA\platforms\android\cordova\lib\prepare.js:47:16
at _fulfilled (F:\IndiansInCA\platforms\android\cordova\node_modules\q\q.js:854:54)
at self.promiseDispatch.done (F:\IndiansInCA\platforms\android\cordova\node_modules\q\q.js:883:30)
at Promise.promise.promiseDispatch (F:\IndiansInCA\platforms\android\cordova\node_modules\q\q.js:816:13)
at F:\IndiansInCA\platforms\android\cordova\node_modules\q\q.js:570:49
at runSingle (F:\IndiansInCA\platforms\android\cordova\node_modules\q\q.js:137:13)
at flush (F:\IndiansInCA\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:12452) 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:12452) [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.

What is your ionic info output for the project?
Have you tried removing and re-adding the platform?

The error you have is this line:


Does your config.xml include an app_name?

i tried remove and ad platform and also update but this error is come in all conditions.

no config.xml doest have app name

the code of github was you send is exact same in my code.

Of course it is, that is the code that is being executed. It just shows where the error is happening.

Do you have a name in your config.xml?

1 Like

no i dont have name in my config.xml

review my config.xml

<?xml version=‘1.0’ encoding=‘utf-8’?>

<widget id=“io.ionic.starter” version=“0.0.1” xmlns=“http://www.w3.org/ns/widgets” xmlns:cdv=“http://cordova.apache.org/ns/1.0”>

<content src=“index.html” />

<plugin name=“cordova-plugin-advanced-http” spec="^1.11.1" />

<platform name=“android”>

<icon density=“ldpi” src=“resources/android/icon/drawable-ldpi-icon.png” />

<icon density=“mdpi” src=“resources/android/icon/drawable-mdpi-icon.png” />

<icon density=“hdpi” src=“resources/android/icon/drawable-hdpi-icon.png” />

<icon density=“xhdpi” src=“resources/android/icon/drawable-xhdpi-icon.png” />

<icon density=“xxhdpi” src=“resources/android/icon/drawable-xxhdpi-icon.png” />

<icon density=“xxxhdpi” src=“resources/android/icon/drawable-xxxhdpi-icon.png” />

<splash density=“land-ldpi” src=“resources/android/splash/drawable-land-ldpi-screen.png” />

<splash density=“land-mdpi” src=“resources/android/splash/drawable-land-mdpi-screen.png” />

<splash density=“land-hdpi” src=“resources/android/splash/drawable-land-hdpi-screen.png” />

<splash density=“land-xhdpi” src=“resources/android/splash/drawable-land-xhdpi-screen.png” />

<splash density=“land-xxhdpi” src=“resources/android/splash/drawable-land-xxhdpi-screen.png” />

<splash density=“land-xxxhdpi” src=“resources/android/splash/drawable-land-xxxhdpi-screen.png” />

<splash density=“port-ldpi” src=“resources/android/splash/drawable-port-ldpi-screen.png” />

<splash density=“port-mdpi” src=“resources/android/splash/drawable-port-mdpi-screen.png” />

<splash density=“port-hdpi” src=“resources/android/splash/drawable-port-hdpi-screen.png” />

<splash density=“port-xhdpi” src=“resources/android/splash/drawable-port-xhdpi-screen.png” />

<splash density=“port-xxhdpi” src=“resources/android/splash/drawable-port-xxhdpi-screen.png” />

<splash density=“port-xxxhdpi” src=“resources/android/splash/drawable-port-xxxhdpi-screen.png” />

</platform>

<preference name=“SplashScreen” value=“screen” />

<preference name=“SplashShowOnlyFirstTime” value=“false” />

<preference name=“SplashScreenDelay” value=“3000” />

</widget>

Create a new project with ionic start and compare the generated config.xml - you need most of what is in there.

1 Like

thanx man i stucked with this problem 3-4 days .
you solve my problem. after comparing the config.xml i found name and many things are missing.

1 Like