Closed kenrestivo closed 10 years ago
This is weird. InterchangeableListAdapter is a part of Neko, it is written in Java, and is included into Neko jar in the compiled form. So for some reason it is not included into dex-file, I've never faced such an issue.
This could be a problem of JDK version mismatch. Can you try doing the same with Neko 3.0.1? It doesn't contain any relevant changes but I could have compiled it with JDK7 (while 3.0.0 might be compiled with 6).
Also, can you do DEBUG=1 lein droid create-dex
to see all the jars that are scanned for classfiles during dexing?
Will do. With neko 3.0.1, and create-dex, the neko 3.0.1 jar is indeed being included, and I get this interesting error:
trouble processing:
bad class file magic (cafebabe) or version (0033.0000)
...while parsing neko/ui/adapters/InterchangeableListAdapter.class
...while processing neko/ui/adapters/InterchangeableListAdapter.class
trouble processing:
bad class file magic (cafebabe) or version (0033.0000)
...while parsing JSONStringEscapingInputStream.class
...while processing JSONStringEscapingInputStream.class
trouble processing:
bad class file magic (cafebabe) or version (0033.0000)
...while parsing org/writequit/tigris/JSONStringEscapingInputStream.class
...while processing org/writequit/tigris/JSONStringEscapingInputStream.class
3 warnings
And the same crash happens.
With 3.0.0, create-dex says:
trouble processing:
bad class file magic (cafebabe) or version (0033.0000)
...while parsing neko/ui/adapters/InterchangeableListAdapter.class
...while processing neko/ui/adapters/InterchangeableListAdapter.class
trouble processing:
bad class file magic (cafebabe) or version (0033.0000)
...while parsing JSONStringEscapingInputStream.class
...while processing JSONStringEscapingInputStream.class
trouble processing:
bad class file magic (cafebabe) or version (0033.0000)
...while parsing org/writequit/tigris/JSONStringEscapingInputStream.class
...while processing org/writequit/tigris/JSONStringEscapingInputStream.class
3 warnings
So, some version mismatch? I confess to being rather ignorant of the JVM and these Java issues, and I thank you very much for your help and quick response. I'm not sure what to do next here.
I should also note that create-dex also says:
/usr/local/android/sdk-linux_x86/build-tools/17.0.0/dx
Which is odd because I have 19.0.1 installed as well.
Aha, I forcibly deleted 17.0.0 and 19.0.1 and left only 19.0.3 in the build-tools dir, and create-dex found the most recent version and used it... and the cafebabe errors stopped.
That was it! With dex from 19.0.3, the error goes away and the program runs. ref-adapter is very cool, almost om/reagent/react-like. Thanks!
Does ref-adapter work?
I'm trying to use ref-adapter, looks very cool, but explodes at runtime with, among other things, the following:
It's unclear from the stacktrace where exactly the failure is, but it happens at the SplashActivity, and the code which calls ref-adapter is:
My versions of things are:
And Android SDK 22.3.
And some project stuff:
And I'm building with lein-droid doall.
I've tried cleaning with lein clean, and wiping out the old APK on the device.
The device is a TF101 running CM 9.1.
Indeed, I looked into the classes.dex and if I am reading it correctly the class is not in there, though it is referenced:
And, looking in target/classes, there's nothing there either.
So, it looks like this class is not getting compiled at all? Why would that be? Is there something wrong with my toolchain, is there something I have misconfigured, or is something missing from neko?