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

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-10 13:52:49

问题


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:

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

回答1:


This was a confirmed bug and is fixed in 6.1.0

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



来源:https://stackoverflow.com/questions/36953652/duplicate-entry-org-appcelerator-titanium-gen-bindings-json-in-custom-android-m

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!