Titanium JIRA Archive
Appcelerator Community (AC)

[AC-1772] Android: Cannot compile a third party Java library in a Titanium Module

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionNeeds more info
Resolution Date2013-08-12T18:21:52.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsAppcelerator Modules, Titanium SDK & CLI
Labelsmobilesdk, module, module.py, titanium
ReporterNoor Alam
AssigneeMauro Parra-Miranda
Created2013-08-12T12:21:14.000+0000
Updated2016-03-08T07:40:39.000+0000

Description

I am working on an Android module in Titanium Studio which uses a third party jar library. When I build the project using the build.xml file with install target, first it gives the warning:
warning: Ignoring InnerClasses attribute for an anonymous inner class
and then it gives a build failed error:
[exec] [ERROR] (com.aspire.vending.c.c) that doesn't come with an
[exec] [ERROR] associated EnclosingMethod attribute. This class was probably produced by a
[exec] [ERROR] compiler that did not target the modern .class file format. The recommended
[exec] [ERROR] solution is to recompile the class from source, using an up-to-date compiler
[exec] [ERROR] and without specifying any "-target" type options. The consequence of ignoring
[exec] [ERROR] this warning is that reflective operations on this class will incorrectly
[exec] [ERROR] indicate that it is *not* an inner class.
[exec] [ERROR] System Error while compiling Android classes.dex
[exec] [ERROR] Build Failed.
Note: When I use this library in eclipse in an Android sample example application it works fine. I put the jar file in lib folder and set the build path from the project properties "java build path setting -> add jars" option. I also tried just referring the path of the file on my disk drive using "java build path setting -> add Add External jars" option but it is gives the same error.

Attachments

FileDateSize
errorlog.rtf2013-08-12T12:21:14.000+000063282

Comments

  1. Daniel Sefton 2013-08-12

    Hi Noor, It would be great if you could create a simple reproducible test case for this (adding the library to a new empty Android module), or at least some steps to reproduce, along with which third party library you're using. Thanks!

JSON Source