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]

Re: Kawa build.xml patch for Android


On Tue, 03 Jul 2012 19:42:23 +0200, Marius Kjeldahl <marius@kjeldahl.net> wrote:
> Thank you, very inspiring!
> 
> Since I haven't had much luck in duplicating your work in reducing the 
> apk payloads, I tried cloning your SchemeAndroidOGL project and see if I 
> could get it to build.
> 
> Updating the make script and proguard.cfg file to use kawa 1.12.1 and 
> android-15, I get lots of errors. I've attached the output from the make 
> process. The first set of warnings I get are:
> 
> > Reading library jar [/opt/android-sdk-linux/platforms/android-15/android.jar]
> > Initializing...
> > Warning: gnu.xquery.lang.XQueryScriptEngineFactory: can't find superclass or interface gnu.expr.AbstractScriptEngineFactory
> > Warning: gnu.kawa.models.WithTransform: can't find referenced class java.awt.Graphics2D
> > Warning: gnu.kawa.models.WithTransform: can't find referenced class java.awt.Graphics2D
> > Warning: gnu.kawa.models.WithTransform: can't find referenced class java.awt.Graphics2D
> > Warning: gnu.kawa.models.WithTransform: can't find referenced class java.awt.geom.AffineTransform

These are exactly the problems I ran into. You need to compile kawa by
running ./configure as follows:

JAVACFLAGS="-source 1.6 -target 1.6" ./configure --prefix=/usr 
--with-android=/opt/android-sdk/platforms/android-14/android.jar
--disable-xquery --disable-brl --disable-jemacs --disable-echo2
--without-swing --without-swt --without-awt --without-sax2

which disables most things (you don't need most of them on android
anyway). Then you need to remove all the gnu.kawa.models... files from
the .jar (extract it, remove the files, then compress it again). The
list is in my previous e-mail.

> At the end of the process I get other types of error.
> 
> I did try to build using your included jar, but then it complained about 
> the class format in your jar file not being supported. I'm on Sun Java 
> 1.6, so I guess you could be on 1.7.

I noticed a problem with one class (gnu.kawa.util.PreProcess) which is
apparently *not* compiled with the correct flags (problem with the kawa
build process?).

I don't have access to any machine with a Java 1.6 right now, but the
steps I mentioned above should give you a working kawa.jar suitable for
android and proguard usage.

Good luck, don't hesitate to ask about any further problems!

Greetings,
Peter


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]