6

Setup / Problem

I've create a custom Android module for Titanium to display Gif animations inside Ti. The module source code can be found here: https://github.com/m1ga/com.miga.gifview

The actual module is working fine but when I use it with a second module (with the same problem) I receive the following error:

java.util.zip.ZipException: duplicate entry: org/appcelerator/titanium/gen/bindings.json

The problem is inside the gifimageview.jar file:

enter image description here

My two modules each have a bindings.json file inside the /gen folder that contains the same information as the bindings/gifview.json. So if I remove it manually in one module I can use both modules (because there is only one bindings.json now).

Question

How can I advise the compiler not to create this file or change the name? When I compile the module with ant I see this in the output:

compile:
    [javac] Compiling 3 source files to /home/miga/dev/ti.gif/android/build/classes
    [javac] warning: [options] bootstrap class path not set in conjunction with -source 1.6
    [javac] Note: [KrollBindingGen] Running Kroll binding generator.
    [javac] Note: [KrollBindingGen] Succesfully loaded existing binding data: /home/miga/dev/ti.gif/android/build/classes/org/appcelerator/titanium/gen/bindings.json
    [javac] Note: [KrollBindingGen] Found binding for proxy GifView
    [javac] Note: [KrollBindingGen] Found binding for module Tigifview
    [javac] Note: [KrollBindingGen] Generating JSON: file:/home/miga/dev/ti.gif/android/build/classes/org/appcelerator/titanium/gen/bindings.json
     [copy] Copying 1 file to /home/miga/dev/ti.gif/android/build/classes

There it is creating the bindings.json

What I've tried

Adding

org.eclipse.jdt.apt.processorOptions/kroll.jsonFile=migagifview.json

to the settings file: https://github.com/m1ga/com.miga.gifview/blob/master/android/.settings/org.eclipse.jdt.apt.core.prefs didn't work

My setup

  • javac -version: javac 1.8.0_91
  • CLI version 5.0.6
  • Titanium SDK version 5.2.2.GA
  • Android-23
5
  • I am having the same issue after upgrading to SDK 5.3.0. Two of my custom android modules produce a bindings.json file. However, the internal content is not the same. This did not happen before. Commented Jun 9, 2016 at 21:10
  • I am also facing the same issue. This is happening after updgrading to 5.3.0.. Please provide any solution to this because it stopped compiling for android. Commented Jun 30, 2016 at 20:30
  • I am facing this issue as well. I found a supposed work around to recompile the modules with SDK 5.4.0.GA or above, so I did this, but I am still getting the error.
    – DaKaZ
    Commented Oct 20, 2016 at 16:04
  • i'm also getting the same issue, however I'm using 6.0.0.GA. was this issue ever fixed?
    – Bish25
    Commented Nov 21, 2016 at 14:54
  • This should work around the problem: github.com/appcelerator/titanium_mobile/pull/8551 Commented Nov 30, 2016 at 14:54

1 Answer 1

3

This was a confirmed bug and is fixed in 6.1.0

Issue details: https://jira.appcelerator.org/browse/TIMOB-23502

2
  • 1
    Thank you for the update. Forgot to update the post. Some stack-points for you!
    – miga
    Commented Nov 28, 2016 at 17:58
  • I have been in contact with the support team and they mentioned that the fix won't be issued till February which is very frustrating!
    – Bish25
    Commented Nov 29, 2016 at 15:01

Not the answer you're looking for? Browse other questions tagged or ask your own question.