On 12.12.2011 19:50, Jonas Maebe wrote:
Hi,

A new FPC JVM snapshot has been put online at http://wiki.freepascal.org/FPC_JVM

The main new feature is full fledged support for Android/Dalvik, including a 
Pascal translation of the Android SDK classes. To compile for Android rather 
than for the Java VM, simply use the -Tandroid command line parameter. The 
compiler will still generate Java class files, but these can then be translated 
into Dalvik code by the Android SDK tools just like any javac-compiled class 
files.

So, I have now tested your new snapshot (nice that "make" finally works in the top level ^^) and I've got the same error as before. The error occurs when I try to instantiate a custom class of mine that implements an (inner) interface from the Android SDK. I have tested the following variations:

* implement a inner interface
* implement a "global" interface
* descend from TObject
* descend from JLObject
* implement in a nested class
* implement in a "global" class

All lead to the same error: ClassDefNotFoundException (and the class that's tried to be created) when instantiating the class.

I have attached an example containing some of the above mentioned variatons, a manifest file and a Makefile which you'll need to adjust to your setup. Then a "make prepare genrjava all" should (in theory) suffice to create a unsigned apk which you can sign by "make signedapk". This can then be installed using "make install" if you have an emulator (or device) running.

Regards,
Sven

Attachment: interfacetest.tar.gz
Description: application/gzip

_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to