This is the mail archive of the kawa@sourceware.org mailing list for the Kawa project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
On Wed, Mar 02, 2011 at 12:39:35AM -0800, Per Bothner wrote: > On 03/01/2011 05:33 PM, Per Bothner wrote: > >The problem appears to be the getContextClassLoader in > >gnu/bytecode/ObjectType.java. If you get rid of the > >special case for Android, then it should work: > >So the question is why did I make this special case for Android > >in the first place? Perhaps earlier versions of Android needed it? > > I checked in this fix. > > I wasn't able to verify whether this fixes breaks older versions of > Android - I kept getting a VerifyError, so I dropped it for now. > > I also changed LangObjType.java so it creates the PrimProcedure > objects (including the one that causes Path to be loaded) as needed, > rather than at startup time. Maybe later I'll add a "cache" - though > perhaps waiting until we can use Java7 MethodHandles might make more > sense. > > Note either of the two fixes (either ObjectType#getContextClassLoader > or to LangObjType.java) should fix the problem, but both changes > seemed reasonable. Hopefully the LangObjType.java change will > reduce the likelihood of a problem with older Android versions. > > (If someone wants to test older Android versions, that would > be much appreciated.) Thanks very much for this, I got things working beautifully now. Is there a way to avoid generating the following classes? gnu/kawa/models/Box gnu/kawa/models/Button gnu/kawa/models/Display gnu/kawa/models/DrawImage gnu/kawa/models/DrawShape gnu/kawa/models/FillShape gnu/kawa/models/Paintable gnu/kawa/models/Spacer gnu/kawa/models/WithComposite gnu/kawa/models/WithPaint gnu/kawa/models/WithTransform gnu/kawa/slib/gui gnu/kawa/models/Column gnu/kawa/models/Label gnu/kawa/models/MenuItem gnu/kawa/models/Row gnu/kawa/models/Text gnu/kawa/models/Viewable gnu/kawa/models/Window gnu/kawa/models/Model gnu/kawa/models/ModelListener gnu/kawa/models/WeakListener These have direct or indirect dependencies on awt/swt, and proguard cannot resolve these when deploying for android. I removed them from the jar file, now I can generated basic apk packages that have 150k with kawa! This is really great :) I'll share my setup as soon as I get things cleaned up a bit! Thanks again for making Kawa this great alternative for targetting the JVM. Peter
Attachment:
pgp00000.pgp
Description: PGP signature
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |