Kay Zheng
2017-08-29 17:10:26 UTC
Hi Per,
I tried building a simple skeleton Android app against the master
branch, targeting Android API level 21 (Android 5.0). The compilation
went well, but there's this ambiguous error when classes are being
transformed to dex files:
Uncaught translation error: com.android.dx.cf.code.SimException:
local variable type mismatch: attempt to set or access a value of type
int using a local variable of type gnu.mapping.CallContext. This is
symptomatic of .class transformation tools that ignore local variable
information.
I don't really understand this error message, but since
gnu.mapping.CallContext is part of Kawa, I'd try and post it in this
mailing list.
The source code for the skeleton app is on
https://github.com/l04m33/KawaAndroidTemplate
And here's how I built Kawa (I didn't install JDK 6, and used OpenJDK
8 instead, thus the explicit JAVACFLAGS):
$ cat rebuild-kawa-latest-android.sh
#!/bin/sh
cd ./Kawa-latest-android
if [ -f 'Makefile' ]; then
make clean
make distclean
fi
git checkout -- .
git apply ../kawa-javacflags.patch
./autogen.sh
export JAVACFLAGS="-g -source 1.6 -target 1.6"
./configure
--with-android=/home/user/android_sdk/platforms/android-21/android.jar
\
--disable-xquery \
--disable-jemacs \
--with-java-source=6
make
And the content of kawa-javacflags.patch:
$ cat kawa-javacflags.patch
diff --git a/Makefile.am b/Makefile.am
index da9e490..a0df1a3 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -372,10 +372,10 @@ $(srcdir)/patch-source-list: $(top_srcdir)/configure
| sed -e 's|./||' | sort > $@
kawa/Version.class: kawa/Version.java
- $(JAVAC) -d . $^
+ $(JAVAC) -d . $(JAVACFLAGS) $^
gnu/kawa/util/PreProcess.class: gnu/kawa/util/PreProcess.java
- $(JAVAC) -d . $^
+ $(JAVAC) -d . $(JAVACFLAGS) $^
JAVA_PREPROCESS_OPTIONS = @JAVA_SOURCE_SELECTOR@
$(PREPROCESS_HTTPSERVER) $(PREPROCESS_XML) $(PREPROCESS_JLINE3)
$(PREPROCESS_AWT)
P.S.: I think this is an separate issue with hairy details, so I made
a new thread.
Regards,
Kay Z.
I tried building a simple skeleton Android app against the master
branch, targeting Android API level 21 (Android 5.0). The compilation
went well, but there's this ambiguous error when classes are being
transformed to dex files:
Uncaught translation error: com.android.dx.cf.code.SimException:
local variable type mismatch: attempt to set or access a value of type
int using a local variable of type gnu.mapping.CallContext. This is
symptomatic of .class transformation tools that ignore local variable
information.
I don't really understand this error message, but since
gnu.mapping.CallContext is part of Kawa, I'd try and post it in this
mailing list.
The source code for the skeleton app is on
https://github.com/l04m33/KawaAndroidTemplate
And here's how I built Kawa (I didn't install JDK 6, and used OpenJDK
8 instead, thus the explicit JAVACFLAGS):
$ cat rebuild-kawa-latest-android.sh
#!/bin/sh
cd ./Kawa-latest-android
if [ -f 'Makefile' ]; then
make clean
make distclean
fi
git checkout -- .
git apply ../kawa-javacflags.patch
./autogen.sh
export JAVACFLAGS="-g -source 1.6 -target 1.6"
./configure
--with-android=/home/user/android_sdk/platforms/android-21/android.jar
\
--disable-xquery \
--disable-jemacs \
--with-java-source=6
make
And the content of kawa-javacflags.patch:
$ cat kawa-javacflags.patch
diff --git a/Makefile.am b/Makefile.am
index da9e490..a0df1a3 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -372,10 +372,10 @@ $(srcdir)/patch-source-list: $(top_srcdir)/configure
| sed -e 's|./||' | sort > $@
kawa/Version.class: kawa/Version.java
- $(JAVAC) -d . $^
+ $(JAVAC) -d . $(JAVACFLAGS) $^
gnu/kawa/util/PreProcess.class: gnu/kawa/util/PreProcess.java
- $(JAVAC) -d . $^
+ $(JAVAC) -d . $(JAVACFLAGS) $^
JAVA_PREPROCESS_OPTIONS = @JAVA_SOURCE_SELECTOR@
$(PREPROCESS_HTTPSERVER) $(PREPROCESS_XML) $(PREPROCESS_JLINE3)
$(PREPROCESS_AWT)
P.S.: I think this is an separate issue with hairy details, so I made
a new thread.
Regards,
Kay Z.