On 12.02.2010, at 16:45, Jackson, Bruce wrote: > Whenever you dx a bundle which has been built with a pre-1.5 compiler you > will usually get a pile of: > > warning: Ignoring InnerClasses attribute for an anonymous inner class that > doesn't come with an associated EnclosingMethod attribute. (This class was > probably produced by a broken compiler.) > > ...messages (assuming that you do use inner classes in the bundle). These > are generated because the bundle was compiled with a pre-1.5 compiler. With > something like the org.jdom bundle, the bundle will not work correctly if it > was compiled with a pre-1.5 compiler and then dx-ed, while using a post-1.5 > it does. > > It may a be a broad assessment of the situation, but I took this experience > to indicate that it was required to build bundles with a post-1.5 compiler. > Indeed if you look around the web, you'll see this warning mentioned in > relation to a number of problems people are having with getting apps running > on Android, when using JARs that were compiled pre-1.5.
Well, you got less messages if you compile with 1.5+, but that's does say that a bundle will not work. When dexifying iPOJO, I have a couple of message too, but the complete iPOJO test suite works on Android (except some features using on the fly bytecode generation). Regards, Clement > > Thanks > > Bruce > > On 12/02/2010 15:25, "Karl Pauls" <[email protected]> wrote: > >> On Fri, Feb 12, 2010 at 4:22 PM, Jackson, Bruce <[email protected]> wrote: >>> I'm taking here about the ad-on bundles (like http, for example) rather than >>> the framework. The dx tool needs to have classes that were compiled with a >>> "new" compiler (i.e. greater than 1.5). >> >> Since when? Always worked for me. Again, the framework itself is >> compiled for 1.3... >> >> regards, >> >> Karl >> >>> Thanks >>> >>> Bruce >>> >>> >>> On 12/02/2010 13:33, "Karl Pauls" <[email protected]> wrote: >>> >>>> Why would you need 1.5 to be able to dex the bundle (the framework >>>> itself is build for 1.3 btw.)? >>>> >>>> regards, >>>> >>>> Karl >>>> >>>> On Fri, Feb 12, 2010 at 1:15 PM, Jackson, Bruce <[email protected]> >>>> wrote: >>>>> Hi Pablo >>>>> >>>>> See the attached code. The biggest problem I've encountered is that the >>>>> Felix distribution is a huge pain to build under JDK 1.5, and therefore to >>>>> be able to use some of the bundles (for example the http service) that are >>>>> part of the distribution. Its not a simple job of just changing a couple >>>>> of >>>>> entries in POM files: some components download pre-built JAR files from >>>>> the >>>>> web and explode these, thereby having classes built under 1.4 which will >>>>> not >>>>> work when you dexify the bundles. >>>>> >>>>> This is something that would be great to see some work done on by the >>>>> Felix >>>>> community, because while its true that the basic Felix core does and will >>>>> support Android, most of the add-on bundles wont. >>>>> >>>>> For my part, the ideal solution would be to see the whole framework be >>>>> based >>>>> on JDK 1.5 and not 1.4. >>>>> >>>>> Thanks >>>>> >>>>> Bruce >>>>> >>>>> >>>>> On 12/02/2010 11:32, "pablomj" <[email protected]> wrote: >>>>> >>>>>> >>>>>> Hi Bruce, I am trying the same, but I don't have the solution yet. >>>>>> Do you have some advance? >>>>>> Salutations, thanks. >>>>>> Pablo. >>>>>> >>>>>> >>>>>> Jackson, Bruce wrote: >>>>>>> >>>>>>> The Felix site has a useful section on getting things going on Android ( >>>>>>> http://felix.apache.org/site/apache-felix-and-google-android.html) but >>>>>>> isn't >>>>>>> so clear about embedding the framework into an Android app" >>>>>>> >>>>>>> "Apache Felix can also be integrated with an Android application. To >>>>>>> achieve >>>>>>> this, you need to embed Felix into onCreate() method of your Activity >>>>>>> class >>>>>>> (see Android docs for more details on how to use an Activity) and >>>>>>> process >>>>>>> your bundles as shown above." >>>>>>> >>>>>>> Has anyone got an example of how you do this? I understand how to write >>>>>>> the >>>>>>> Android app, and I get the point being made here. What I need to >>>>>>> understand >>>>>>> is: >>>>>>> >>>>>>> 1. How do you launch the Felix framework. What do I need to instantiate? >>>>>>> 2. Where does the framework get its boot configuration (i.e. what >>>>>>> bundles >>>>>>> to >>>>>>> load, run levels, environment variables, etc) from in this case? >>>>>>> >>>>>>> >>>>>>> >>>>> >>>>> >>>> >>>> >>> >>> >> >> >
