Duplicate entry: org/appcelerator/titanium/gen/bindings.json in custom Android module
Asked Answered
T

1

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
Transvalue answered 30/4, 2016 at 10:20 Comment(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.Unroot
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.Ursas
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.Sebastien
i'm also getting the same issue, however I'm using 6.0.0.GA. was this issue ever fixed?Balcony
This should work around the problem: github.com/appcelerator/titanium_mobile/pull/8551Advisedly
C
3

This was a confirmed bug and is fixed in 6.1.0

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

Clarance answered 28/11, 2016 at 11:58 Comment(2)
Thank you for the update. Forgot to update the post. Some stack-points for you!Transvalue
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!Balcony

© 2022 - 2024 — McMap. All rights reserved.