Titanium JIRA Archive
Appcelerator Community (AC)

[AC-2808] Android module compilation fails on ubuntu 11.10 with 1.8.0.1 and later (reason known)

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionFixed
Resolution Date2012-02-21T12:08:11.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsTitanium SDK & CLI
Labelsn/a
ReporterPatric de Waha
AssigneeShak Hossain
Created2011-12-26T05:21:15.000+0000
Updated2016-03-08T07:47:44.000+0000

Description

Compilation of custom module fails to due to KrollBindingGenerator Exact problem is in: KrollBindingGenerator.java:248 It tries to get the path from the current class, which on my system results in the path of ANT: /usr/share/ant Then it tries to load the titanium.jar which of course cannot be found in that path. I am not the only one with this probably (c.f. Q&A) Dump of exception during compile {noformat} Buildfile: build.xml init: [mkdir] Created dir: /home/psec/Development/MobileApps/modules/zaponutils/build/classes [mkdir] Created dir: /home/psec/Development/MobileApps/modules/zaponutils/dist process.annotations: [mkdir] Created dir: /home/psec/Development/MobileApps/modules/zaponutils/build/generated/json [javac] Compiling 1 source file to /home/psec/Development/MobileApps/modules/zaponutils/build/classes [javac] Note: [KrollBindingGen] Running Kroll binding generator. [javac] Note: [KrollBindingGen] No binding data found, creating new data file: org.appcelerator.titanium.bindings/zaponutils.json [javac] Note: [KrollBindingGen] Found binding for module Zaponutils [javac] Note: [KrollBindingGen] Generating JSON: /home/psec/Development/MobileApps/modules/zaponutils/build/generated/json/org/appcelerator/titanium/bindings/zaponutils.json [javac] warning: The following options were not recognized by any processor: '[kroll.checkTiContext]' generate.rhino.bindings: [java] java.util.zip.ZipException: error in opening zip file [java] at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:194) [java] at org.apache.tools.ant.taskdefs.Java.run(Java.java:764) [java] at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:218) [java] at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:132) [java] at org.apache.tools.ant.taskdefs.Java.execute(Java.java:105) [java] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288) [java] at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source) [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [java] at java.lang.reflect.Method.invoke(Method.java:597) [java] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) [java] at org.apache.tools.ant.Task.perform(Task.java:348) [java] at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:62) [java] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288) [java] at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source) [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [java] at java.lang.reflect.Method.invoke(Method.java:597) [java] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) [java] at org.apache.tools.ant.Task.perform(Task.java:348) [java] at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:394) [java] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288) [java] at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source) [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [java] at java.lang.reflect.Method.invoke(Method.java:597) [java] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) [java] at org.apache.tools.ant.Task.perform(Task.java:348) [java] at org.apache.tools.ant.Target.execute(Target.java:357) [java] at org.apache.tools.ant.Target.performTasks(Target.java:385) [java] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337) [java] at org.apache.tools.ant.Project.executeTarget(Project.java:1306) [java] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) [java] at org.apache.tools.ant.Project.executeTargets(Project.java:1189) [java] at org.apache.tools.ant.Main.runBuild(Main.java:758) [java] at org.apache.tools.ant.Main.startAnt(Main.java:217) [java] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257) [java] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104) [java] Caused by: java.util.zip.ZipException: error in opening zip file [java] at java.util.zip.ZipFile.open(Native Method) [java] at java.util.zip.ZipFile.(ZipFile.java:127) [java] at java.util.jar.JarFile.(JarFile.java:135) [java] at java.util.jar.JarFile.(JarFile.java:99) [java] at org.appcelerator.kroll.annotations.generator.KrollBindingGenerator.loadTitaniumBindings(KrollBindingGenerator.java:248) [java] at org.appcelerator.kroll.annotations.generator.KrollBindingGenerator.main(KrollBindingGenerator.java:355) [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [java] at java.lang.reflect.Method.invoke(Method.java:597) [java] at org.apache.tools.ant.taskdefs.ExecuteJava.run(ExecuteJava.java:217) [java] at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:152) [java] ... 34 more [java] --- Nested Exception --- [java] java.util.zip.ZipException: error in opening zip file [java] at java.util.zip.ZipFile.open(Native Method) [java] at java.util.zip.ZipFile.(ZipFile.java:127) [java] at java.util.jar.JarFile.(JarFile.java:135) [java] at java.util.jar.JarFile.(JarFile.java:99) [java] at org.appcelerator.kroll.annotations.generator.KrollBindingGenerator.loadTitaniumBindings(KrollBindingGenerator.java:248) [java] at org.appcelerator.kroll.annotations.generator.KrollBindingGenerator.main(KrollBindingGenerator.java:355) [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [java] at java.lang.reflect.Method.invoke(Method.java:597) [java] at org.apache.tools.ant.taskdefs.ExecuteJava.run(ExecuteJava.java:217) [java] at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:152) [java] at org.apache.tools.ant.taskdefs.Java.run(Java.java:764) [java] at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:218) [java] at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:132) [java] at org.apache.tools.ant.taskdefs.Java.execute(Java.java:105) [java] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288) [java] at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source) [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [java] at java.lang.reflect.Method.invoke(Method.java:597) [java] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) [java] at org.apache.tools.ant.Task.perform(Task.java:348) [java] at org.apache.tools.ant.taskdefs.Sequential.execute(Sequential.java:62) [java] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288) [java] at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source) [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [java] at java.lang.reflect.Method.invoke(Method.java:597) [java] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) [java] at org.apache.tools.ant.Task.perform(Task.java:348) [java] at org.apache.tools.ant.taskdefs.MacroInstance.execute(MacroInstance.java:394) [java] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288) [java] at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source) [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [java] at java.lang.reflect.Method.invoke(Method.java:597) [java] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) [java] at org.apache.tools.ant.Task.perform(Task.java:348) [java] at org.apache.tools.ant.Target.execute(Target.java:357) [java] at org.apache.tools.ant.Target.performTasks(Target.java:385) [java] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337) [java] at org.apache.tools.ant.Project.executeTarget(Project.java:1306) [java] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) [java] at org.apache.tools.ant.Project.executeTargets(Project.java:1189) [java] at org.apache.tools.ant.Main.runBuild(Main.java:758) [java] at org.apache.tools.ant.Main.startAnt(Main.java:217) [java] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257) [java] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104) [java] Java Result: -1 {noformat}

Comments

  1. Dawson Toth 2011-12-27

    Hi Patric, Would you provide a bit more information so that we can help you solve the issues you are facing? Specifically, we need steps to reproduce what you are seeing. (I am able to successfully build modules, otherwise I would not be asking for these steps.) Are you able to see this issue with a newly created module? Or just with existing modules? Have you done an ant clean before attempting an ant? Regards, Dawson
  2. Tomas Persson 2012-02-16

    I this exact same issue, but on osx 10.6.8. I can't compile the example module project even. http://developer.appcelerator.com/question/132207/cannot-build-custom-android-module-on-osx-with-181
  3. Mauro Parra-Miranda 2012-02-21

    Tested on 1.8.1, examples are compiling properly.
  4. Mauro Parra-Miranda 2012-02-21

    Working fine.

JSON Source