4 Replies Latest reply on May 26, 2008 4:07 AM by Dema_In_Russia

    error. update app

    Dema_In_Russia
      Hello.
      when I update application, show this error:
      "This application cannot be installed because this installer has been mis-configured. Please contact the application author for assistance."

      How remedy this defects?

      code:
      var updater:Updater = new Updater();
      var airFile:File = File.applicationDirectory.resolvePath("Update.air");
      updater.update(airFile,"2.0");

      I load file Update.air in folder with AIR-project.

        • 1. Re: error. update app
          Level 1
          Is "2.0" the current version of the app or the version that you are upgrading to? I had similar issue when I mistakenly used the current version as the second argument to update method. The second argument should be same as the version in the Update.air's -app.xml.
          • 2. Re: error. update app
            Dema_In_Russia Level 1
            How does create this version ??? Where am I find this file app.xml? Or How can I give new version.
            • 3. Re: error. update app
              Level 1
              Each AIR app has an application descriptor file. When you build your app in Flex builder, FB creates it automatically for you. If your application mxml file name is MyApp.mxml, then FB creates the descriptor as MyApp-app.xml. If you use aptana plugin, it creates descriptor as application.xml. In the descriptor there is an element called <version>. This version # in Updater.air app should match the version to update() method call. When you export a release build, the descriptor will be added to the air package as application.xml in META-INF\AIR folder.

              If you want to see what's in your Updater.air, make a copy of the Updater.air as Updater.zip and look for META-INF\AIR\application.xml inside the zip. You will see <version> element in the application.xml file.
              • 4. Re: error. update app
                Dema_In_Russia Level 1
                This is good... Thank you!