Monday, 24 February 2014

Unable to open 'xxx-unaligned.apk' as zip archive

If you found in your logs something like this`Unable to open 'xxx-unaligned.apk' as zip archive` it means that somehow compiler cannot reach to all resources so make sure that none of your project items doesn't have spaces in names.
In my situation I couldn't compile project because folder which I was storing project was named "project_android _version_x". As you see the title had space which shouldn't exist. If not, try select it by mouse and you will discover little space between "android" and "_version". Second important thing is to make sure your path to project isn't too long, sometimes it also makes problems..

Few steps:
  1. close project
  2. delete .idea, .iml, gen and out folders in project, main root
  3. correct names of folders which have android projects
  4. import again project
  5. and try now rebuild