Why does archiving break the build? RRS feed

  • Question

  • User369167 posted

    Hi all,

    I'm publishing my first app to the internal test track.

    When I build for release and run in the emulator, the app plays nicely. After archiving the app ready for distribution, if I run the app locally again it crashes. I discovered this after finding that in the pre-launch report in the Play Console, the app crashed on launch on all devices.

    On first launch, the app copies 2 json files from the assets folder to the app directory. These files aren't being found in the assets directory.

    I've noticed that if, before uploading to the Play Console, I clear out the bin and obj folders before building and archiving, the build works and the pre-launch report shows no errors.

    The process seems very fragile to me. Why should it be necessary to clear out the build folders before archiving? So my question is whether this is a bug or whether I've got something wrong?

    My build setting:

    Saturday, July 4, 2020 10:51 AM

All replies

  • User369167 posted

    After posting this, I've realised that I have Multi-Dex enabled. This wasn't a conscious choice, but having looked into it, I don't need it. Could this have an impact?

    Saturday, July 4, 2020 10:57 AM
  • User369979 posted

    You could check it off and test again. However, this is a good experience that do some cleaning before archiving. This could remove some unnecessary caches.

    Monday, July 6, 2020 9:43 AM
  • User369167 posted

    Thanks for your response.

    I've got into the habit of clearing out the files now, but it isn't a good developer experience. I would expect the archiving process to do whatever is necessary to archive successfully, including removing any unnecessary caches.

    Al least it's working now.

    Thanks again.

    Wednesday, July 8, 2020 11:36 AM
  • User369979 posted

    This appears to be an IDE issue. You could try to raise threads here: https://developercommunity.visualstudio.com/spaces/8/index.html Or open a free support ticket: https://support.microsoft.com/en-us/supportforbusiness/productselection?sapId=211dd84f-3474-c3c5-79bf-66db630c92a6

    Thursday, July 9, 2020 9:27 AM