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

[TIMOB-23502] Prevent Android module duplicate entry build error #8551

Merged
merged 1 commit into from Oct 28, 2016

Conversation

garymathews
Copy link
Contributor

  • Remove unnecessary gen folder that causes duplicate errors when building Android modules
  • Module bindings are stored in the bindings folder, leaving gen redundant
TEST CASE
  • Build a module using appc run --build-only (ti.facebook)
  • Add the module to a project
  • Add another android module to the project
  • The project can be built successfully without errors

JIRA Ticket

@garymathews
Copy link
Contributor Author

test this please

@sgtcoolguy
Copy link
Contributor

Requires #8550 be merged first for testing...

@sgtcoolguy
Copy link
Contributor

Created an app with ti.map and Facebook android modules. Generated the Facebook module using a master SDK with the module build fix but not this fix. Building the app failed.
Then built the module with a local SDK built with this fix, dropped it in the app, rte-built the app and it worked.

👍 LGTM

@sgtcoolguy sgtcoolguy merged commit ab078ce into tidev:master Oct 28, 2016
@Astrovic
Copy link
Sponsor

Astrovic commented Dec 1, 2016

I had this problem, but with this fix has been resolved.
But now a new problem appears:

[ERROR] Failed to sign apk:
[ERROR] jarsigner: unable to sign jar: java.util.zip.ZipException: duplicate entry: assets/README

@j-nguyen
Copy link

@Astrovic, this might be a bit old, but I managed to fix that by just deleting the README file. It worked like a charm

@Astrovic
Copy link
Sponsor

@j-nguyen i did the same

manojdcoder pushed a commit to manojdcoder/titanium_mobile that referenced this pull request Jan 11, 2017
manojdcoder pushed a commit to manojdcoder/titanium_mobile that referenced this pull request Jan 13, 2017
manojdcoder pushed a commit to manojdcoder/titanium_mobile that referenced this pull request Jan 14, 2017
progress44 pushed a commit to caffeinalab/titanium_mobile that referenced this pull request Jan 20, 2017
@yozef
Copy link

yozef commented Jan 28, 2017

I'm having the same issue with 2 other Android modules (ti.draggable & com.animecys.animator)
What I've done is:
1- Downloaded latest Nightly Build (Ti 6.1.0.v20170126175503.... which has commit: ab078ce implemented, manually checked it too to double confirm the change is in the sdk)
2- Updated the Module's build.properties to use 6.1.0.v20170126175503 sdk for both modules
ex: titanium.platform=/Users/yozef/Library/Application Support/Titanium/mobilesdk/osx/6.1.0.v20170126175503/android
3- Deleted README file (located in proj/assets/README) for both modules
4- Compiled the module through appc run --build-only
5- Added both Modules to a Ti App project

When I run the App, I still get:

[ERROR] :  Failed to sign apk:
[ERROR] :  jarsigner: unable to sign jar: java.util.zip.ZipException: duplicate entry: org/appcelerator/titanium/gen/bindings.json

@sgtcoolguy
Copy link
Contributor

@yozef This may be a bit confusing, but what SDK version do you have configured to use through he appc cli? Basically though you may be building the modules against a specific SDK, you might have the overall appc run using an older SDK without the fix for the CLI command.

@yozef
Copy link

yozef commented Jan 30, 2017

@sgtcoolguy Is this what you were asking?
appc -v 6.1.0
appc cli -v 6.1.0

One thing I'd like to clarify, when building the module, does that have to be with 6.1.0 SDK in the build.properties, or simply when Running the Ti App, to be built with 6.1.0? Or both?

@garymathews
Copy link
Contributor Author

@yozef build.properties is redundant when using appc run --build-only, use appc ti sdk select

@hansemannn
Copy link
Collaborator

@garymathews There has been quite a lot of activity on JIRA and Slack regarding this "assets/README" issue that came after fixing the bindings. Please let me know if you need additional logs and/or affected users.

@yozef
Copy link

yozef commented Jan 30, 2017

Worked! Thanks @garymathews @hansemannn

All I needed was to appc ti sdk select 6.1.0 and re-build all Android Modules with appc run --build-only from their /android/ folder.

App runs now with No more issues from:
[ERROR] jarsigner: unable to sign jar: java.util.zip.ZipException: duplicate entry: assets/README
Nor:
Duplicate entry: org/appcelerator/titanium/gen/bindings.json

yozef added a commit to yozef/ti.map_old that referenced this pull request Jan 30, 2017
NableCommunications added a commit to NableCommunications/titanium_mobile_nable that referenced this pull request Aug 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants