Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to build when app contains .gz file #393

Closed
rosen-vladimirov opened this issue Mar 30, 2015 · 6 comments
Closed

Unable to build when app contains .gz file #393

rosen-vladimirov opened this issue Mar 30, 2015 · 6 comments
Assignees
Labels
Milestone

Comments

@rosen-vladimirov
Copy link
Contributor

In case the app contains .gz file, build for android fails on package-resources step:
-package-resources:
[aapt] Creating full resource package...
[aapt] Unable to add 'd:\Work\scratch\app1\platforms\android\assets\app\app\app.js.gz': file already in archive (try '-u'?)
[aapt] ERROR: unable to process assets while packaging 'd:\Work\scratch\app1\platforms\android\bin\app1.ap_'
[aapt] ERROR: packaging of 'd:\Work\scratch\app1\platforms\android\bin\app1.ap_' failed

BUILD FAILED
d:\Program Files\android_sdk\tools\ant\build.xml:932: The following error occurred while executing this line:
d:\Program Files\android_sdk\tools\ant\build.xml:950: null returned: 1

Steps to reproduce:

  • Create project: tns create app1
  • cd app1
  • tns platform add android
  • cd app/app/
  • create gzip in this directory or copy one from somewhere
  • tns build android
@rosen-vladimirov
Copy link
Contributor Author

Note, the issue has high impact, when your app contains node_modules, some of them, like semver, contain .gz files

@dtopuzov dtopuzov added this to the 1.3.0 milestone Aug 5, 2015
@teobugslayer teobugslayer modified the milestones: 1.4.0, 1.3.0 Aug 31, 2015
@ligaz ligaz modified the milestones: 1.4.0 (Under review), 1.5.0 Sep 17, 2015
@rosen-vladimirov
Copy link
Contributor Author

This issue is no longer relevant, it is related to ant, but from CLI 1.3.0, we are using Gradle for Android builds.
So I'm going to close this issue :)

@rosen-vladimirov rosen-vladimirov modified the milestones: 1.4.0, 1.5.0 (under consideration) Sep 30, 2015
@rosen-vladimirov rosen-vladimirov self-assigned this Sep 30, 2015
@vchimev vchimev reopened this Oct 1, 2015
@dtopuzov dtopuzov closed this as completed Oct 5, 2015
@dtopuzov dtopuzov removed the 3 - Done label Oct 5, 2015
@gausie
Copy link

gausie commented Oct 24, 2015

I'm still getting this even with Gradle.

@rosen-vladimirov
Copy link
Contributor Author

Hi @gausie
May I ask you for more information on this case, what is your CLI's version and which android runtime are you using? Can you give us steps to reproduce this case?

@bobbyflowstate
Copy link

I'm getting "Zip add failed":

  Unable to add '/Users/****/src/******/*****/app/build/intermediates/assets/debug/native-config/asef439406aae92bbba6b.js.gz': Zip add failed (-2147483648)

This file was added to my assets folder. If I change the file to a .mp3 extension then it works, but I need the .gz file to be used in my app.

@josx
Copy link

josx commented Jan 14, 2016

Its an aapt problem.
Maybe you can delete .gz files before building.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

8 participants