title: Cordova build/run android fails: Cannot read property 'tag' of null
body: <p>I am building an Ionic app and I'd like to use the plugin firebasex.</p>
  
  <p>Unfortunately, when running Ionic cordova build/run android, I am getting the following error: Cannot read property 'tag' of null</p>
  
  <p>It seems my config.xml is OK.</p>
  
  <p>The only thing I found was a missing "name" tag, but it is present in my xml.</p>
  
  <p>If I run cordova run android --verbose, I get the following output:</p>
  
  <pre><code>No scripts found for hook "before_run".
  No scripts found for hook "before_prepare".
  Checking config.xml and package.json for saved platforms that haven't been added to the project
  Config.xml and package.json platforms are the same. No pkg.json modification.
  Package.json and config.xml platforms are different. Updating config.xml with most current list of platforms.
  PlatformApi successfully found for platform android
  Checking config.xml for saved plugins that haven't been added to the project
  Checking for any plugins added to the project that have not been installed in android platform
  No differences found between plugins added to project and installed in android platform. Continuing...
  Generating platform-specific config.xml from defaults for android at C:\[...]\platforms\android\app\src\main\res\xml\config.xml
  Cannot read property 'tag' of null
  TypeError: Cannot read property 'tag' of null
      at Object.resolveParent (C:\[...]\node_modules\cordova-common\src\util\xml-helpers.js:192:58)
      at Object.graftXMLMerge (C:\[...]\node_modules\cordova-common\src\util\xml-helpers.js:92:37)
      at ConfigFile_graft_child [as graft_child] (C:\[...]\node_modules\cordova-common\src\ConfigChanges\ConfigFile.js:110:42)
      at PlatformMunger_apply_file_munge [as apply_file_munge] (C:\[...]\node_modules\cordova-common\src\ConfigChanges\ConfigChanges.js:81:34)
      at PlatformMunger.reapply_global_munge (C:\[...]\node_modules\cordova-common\src\ConfigChanges\ConfigChanges.js:268:14)
      at updateConfigFilesFrom (C:\[...]\platforms\android\cordova\lib\prepare.js:113:18)
      at Api.module.exports.prepare (C:\[...]\platforms\android\cordova\lib\prepare.js:44:20)
      at Api.prepare (C:\[...]\platforms\android\cordova\Api.js:177:45)
      at C:\[...]\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\cordova\prepare.js:105:36
      at _fulfilled (C:\[...]\AppData\Roaming\npm\node_modules\cordova\node_modules\q\q.js:854:54)
  </code></pre>
  
  <p>My config.xml: </p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;?xml version='1.0' encoding='utf-8'?&gt;
  &lt;widget id="com.my.app" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0"&gt;
      &lt;allow-navigation href="http://localhost/*" /&gt;
      &lt;allow-navigation href="https://localhost/*" /&gt;
      &lt;allow-navigation href="ionic://*" /&gt;
      &lt;feature name="IonicWebView"&gt;
          &lt;param name="android-package" value="com.ionicframework.cordova.webview.IonicWebView" /&gt;
      &lt;/feature&gt;
      &lt;feature name="File"&gt;
          &lt;param name="android-package" value="org.apache.cordova.file.FileUtils" /&gt;
          &lt;param name="onload" value="true" /&gt;
      &lt;/feature&gt;
      &lt;allow-navigation href="cdvfile:*" /&gt;
      &lt;feature name="FileTransfer"&gt;
          &lt;param name="android-package" value="org.apache.cordova.filetransfer.FileTransfer" /&gt;
      &lt;/feature&gt;
      &lt;feature name="Camera"&gt;
          &lt;param name="android-package" value="org.apache.cordova.camera.CameraLauncher" /&gt;
      &lt;/feature&gt;
      &lt;feature name="StreamingMedia"&gt;
          &lt;param name="android-package" value="com.hutchind.cordova.plugins.streamingmedia.StreamingMedia" /&gt;
      &lt;/feature&gt;
      &lt;feature name="Capture"&gt;
          &lt;param name="android-package" value="org.apache.cordova.mediacapture.Capture" /&gt;
      &lt;/feature&gt;
      &lt;feature name="Base64"&gt;
          &lt;param name="android-package" value="com.badrit.Base64.Base64Plugin" /&gt;
      &lt;/feature&gt;
      &lt;feature name="SocialSharing"&gt;
          &lt;param name="android-package" value="nl.xservices.plugins.SocialSharing" /&gt;
      &lt;/feature&gt;
      &lt;feature name="FileChooser"&gt;
          &lt;param name="android-package" value="com.megster.cordova.FileChooser" /&gt;
      &lt;/feature&gt;
      &lt;name&gt;myapp&lt;/name&gt;
      &lt;description&gt;super app&lt;/description&gt;
      &lt;author email="contact@contact.contact" href="http://contact.contact/"&gt;contact&lt;/author&gt;
      &lt;content src="index.html" /&gt;
      &lt;access origin="*" /&gt;
      &lt;allow-intent href="http://*/*" /&gt;
      &lt;allow-intent href="https://*/*" /&gt;
      &lt;allow-intent href="tel:*" /&gt;
      &lt;allow-intent href="sms:*" /&gt;
      &lt;allow-intent href="mailto:*" /&gt;
      &lt;allow-intent href="geo:*" /&gt;
      &lt;edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application" xmlns:android="http://schemas.android.com/apk/res/android"&gt;
          &lt;application android:networkSecurityConfig="@xml/network_security_config" /&gt;
      &lt;/edit-config&gt;
      &lt;resource-file src="resources/android/xml/network_security_config.xml" target="app/src/main/res/xml/network_security_config.xml" /&gt;
      &lt;allow-intent href="market:*" /&gt;
      &lt;icon density="ldpi" src="resources/android/icon/drawable-ldpi-icon.png" /&gt;
      &lt;icon density="mdpi" src="resources/android/icon/drawable-mdpi-icon.png" /&gt;
      &lt;icon density="hdpi" src="resources/android/icon/drawable-hdpi-icon.png" /&gt;
      &lt;icon density="xhdpi" src="resources/android/icon/drawable-xhdpi-icon.png" /&gt;
      &lt;icon density="xxhdpi" src="resources/android/icon/drawable-xxhdpi-icon.png" /&gt;
      &lt;icon density="xxxhdpi" src="resources/android/icon/drawable-xxxhdpi-icon.png" /&gt;
      &lt;splash density="land-ldpi" src="resources/android/splash/drawable-land-ldpi-screen.png" /&gt;
      &lt;splash density="land-mdpi" src="resources/android/splash/drawable-land-mdpi-screen.png" /&gt;
      &lt;splash density="land-hdpi" src="resources/android/splash/drawable-land-hdpi-screen.png" /&gt;
      &lt;splash density="land-xhdpi" src="resources/android/splash/drawable-land-xhdpi-screen.png" /&gt;
      &lt;splash density="land-xxhdpi" src="resources/android/splash/drawable-land-xxhdpi-screen.png" /&gt;
      &lt;splash density="land-xxxhdpi" src="resources/android/splash/drawable-land-xxxhdpi-screen.png" /&gt;
      &lt;splash density="port-ldpi" src="resources/android/splash/drawable-port-ldpi-screen.png" /&gt;
      &lt;splash density="port-mdpi" src="resources/android/splash/drawable-port-mdpi-screen.png" /&gt;
      &lt;splash density="port-hdpi" src="resources/android/splash/drawable-port-hdpi-screen.png" /&gt;
      &lt;splash density="port-xhdpi" src="resources/android/splash/drawable-port-xhdpi-screen.png" /&gt;
      &lt;splash density="port-xxhdpi" src="resources/android/splash/drawable-port-xxhdpi-screen.png" /&gt;
      &lt;splash density="port-xxxhdpi" src="resources/android/splash/drawable-port-xxxhdpi-screen.png" /&gt;
      &lt;preference name="loglevel" value="DEBUG" /&gt;
      &lt;preference name="webView" value="com.ionicframework.cordova.webview.IonicWebViewEngine" /&gt;
      &lt;preference name="ScrollEnabled" value="false" /&gt;
      &lt;preference name="android-minSdkVersion" value="19" /&gt;
      &lt;preference name="BackupWebStorage" value="none" /&gt;
      &lt;preference name="SplashMaintainAspectRatio" value="true" /&gt;
      &lt;preference name="FadeSplashScreenDuration" value="300" /&gt;
      &lt;preference name="SplashShowOnlyFirstTime" value="false" /&gt;
      &lt;preference name="SplashScreen" value="screen" /&gt;
      &lt;preference name="SplashScreenDelay" value="3000" /&gt;
      &lt;engine name="android" spec="^8.0.0" /&gt;
  &lt;/widget&gt;
  </code></pre>
  
  <p>Thanks for helping!</p>