2 Replies Latest reply on Oct 20, 2016 12:03 AM by davidh7174699

    Error - A 9-patch image in your assets is malformed: splash.9.png

    davidh7174699 Level 1

      Our build failed with that error.


      The story: we have built the same app early 2016 several times with success.

      A week ago, we added a simple feature which only requires adding a few lines

      in a javascript file. We changed nothing else except config.xml to adjust for

      for the latest Builder requirements. No assets changed. We do not have splash.9.png in

      our assets so I'm guessing that spash.9.png is something that the Builder created.


      We have searched the forums and internet high and low without success. There is

      no information whether something else besides config.xml needs to be changed for

      the current Builder version. Previously we used cli-5.2.0 when the config.xml still

      used the gap:plugin syntax. That's the only change.


      The current config.xml looks something like this:


      <?xml version='1.0' encoding='utf-8'?>
      <widget id="net.resolusi.wonderful" version="1.1.0" xmlns="http://www.w3.org/ns/widgets" xmlns:gap="http://phonegap.com/ns/1.0">
      <preference name="phonegap-version" value="cli-6.3.0" />
      <splash src="splash.png" />
      <platform name="android">
        <splash src="res/screen/android/screen-ldpi.9.png" qualifier="land-ldpi" />
        <splash src="res/screen/android/screen-ldpi.9.png" qualifier="port-ldpi" />


      We're lost with this. Please help.

        • 1. Re: Error - A 9-patch image in your assets is malformed: splash.9.png
          ryanskihead Adobe Employee

          Try changing your icon filename from screen-ldpi.9.png to screen-ldpi-9.png. I've seen the android build chain have issues with having more than one period.


          Alternatively I notice you're using the same image for both landscape and portrait -- these icons need to be specific dimensions, which means one of those is going to have the expected dimensions reversed. Landscape ldpi should be 320x200, while portrait ldpi should be 200x320. You can't use the same image for both.


          While this may have worked for you for cli-5.2.0, upgrading to cli-6.3.0 will of course introduce significant changes.

          • 2. Re: Error - A 9-patch image in your assets is malformed: splash.9.png
            davidh7174699 Level 1



            That solves the problem!

            We simply changed all the xxx.9.png to xxx-9.png and it works.


            We still have a minor problem: the icon in the build page doesn't appear.


            Note however that when we install the .apk file directly, everything works.



            <icon src="icon.png" />
            <platform name="android">
                 <icon src="icon.png" qualifier="nodpi" />


            I don't see how this has anything to do with web page so I have no idea

            how to solve this.


            Thank you so much!