This is the mail archive of the
kawa@sourceware.org
mailing list for the Kawa project.
Kawa with Android Studio and Gradle
- From: Marius Kjeldahl <marius at kjeldahl dot net>
- To: kawa at sourceware dot org
- Date: Mon, 08 Jul 2013 16:54:32 +0200
- Subject: Kawa with Android Studio and Gradle
As you may know, Google has released a tech preview of Android Studio,
their fork of the IntelliJ Java IDE (replacing Eclipse) and gradle for
building (replacing ant).
I've been trying to get a simple program running as a first step of
contributing some kawa build scripts, but I have hit a road block.
Basically, I'm trying to compile and run the example found here:
http://www.gnu.org/software/kawa/Android-view-construction.html
I've basically created a new "blank" project in Android Studio, gotten
rid of the generated java stuff and replaced it with my own class files
compiled (manually for now) from the scheme source file.
When the gradle build script tries to package my application however, it
fails while running dx, and considering I haven't done much inside kawa
yet, it's somewhat cryptic to me. I'm sharing it here hoping to get some
hints if this is something related to kawa/java interrop has been
implemented in kawa, or any other hints on how to proceed.
I've attached the output I get after running "./gradlew assembleDebug".
Considering the classes it refers to and my brief recollection about
some of the tricks being used by kawa, I figured somebody here might
have a much better clue than me of what needs to be done.
Thanks,
Marius Kjeldahl
----8<--------8<--------8<--------8<----
The TaskContainer.add() method has been deprecated and is scheduled to
be removed in Gradle 2.0. Please use the create() method instead.
:NcMalPoc:prepareDebugDependencies
:NcMalPoc:compileDebugAidl
:NcMalPoc:generateDebugBuildConfig
:NcMalPoc:mergeDebugAssets
:NcMalPoc:compileDebugRenderscript
:NcMalPoc:mergeDebugResources
:NcMalPoc:processDebugManifest
:NcMalPoc:processDebugResources
:NcMalPoc:compileDebug
:NcMalPoc:dexDebug
EXCEPTION FROM SIMULATION:
local variable type mismatch: attempt to set or access a value of type
java.lang.Object using a local variable of type boolean. This is
symptomatic of .class transformation tools that ignore local variable
information.
...at bytecode offset 000002cd
locals[0000]: Lgnu/kawa/slib/printf$frame11;
locals[0001]: Ljava/lang/Object;
locals[0002]: Ljava/lang/Object;
locals[0003]: Ljava/lang/Object;
locals[0004]: Ljava/lang/Object;
locals[0005]: [Ljava/lang/Object;
locals[0006]: Lgnu/lists/LList;
locals[0007]: I
locals[0008]: I
locals[0009]: I
locals[000a]: Ljava/lang/Boolean;
locals[000b]: Ljava/lang/Object;
locals[000c]: Lgnu/kawa/slib/printf$frame11;
locals[000d]: I
locals[000e]: Ljava/lang/Boolean;
locals[000f]: <invalid>
locals[0010]: <invalid>
stack[0002]: Ljava/lang/String;
stack[0001]: Ljava/lang/Object;
stack[top0]: Ljava/lang/Object;
...while working on block 02cb
...while working on method
lambda29formatReal$V:(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
...while processing lambda29formatReal$V
(Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;
...while processing gnu/kawa/slib/printf$frame11.class
1 error; aborting
:NcMalPoc:dexDebug FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':NcMalPoc:dexDebug'.
> Running /opt/android-studio/sdk/build-tools/android-4.2.2/dx failed.
See output
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or
--debug option to get more log output.
BUILD FAILED
Total time: 10.423 secs