powered by Jive Software

Problem with MessageListener

Hi,

04-14 13:40:13.418:

I/dalvikvm(8378): Failed resolving Lde/xxx/mobileclient/services/XMPPHelper; interface 3155 ‘Lorg/jivesoftware/smack/MessageListener;’

I am getting this error with newer asmack snapshots. Reverting back to the one from 20.3 works fine but i havent testet each one individualy.

Thanks

Fuu

Did you try a clean build?

Yes i did try cleaning the project. It still doesnt work. Going to test it in another App when i am home.

Still no progress. Sticking with the older snapshot for now.

Do you use proguard or the like?

Failed resolving Lde/xxx/mobileclient/services/XMPPHelper; interface 3155 'Lorg/jivesoftware/smack/MessageListener;'
This messages tells you that dalvik was unable to find the class de.xxx.mobileclient.services.XMPPHelper, which is not part of Smack but extends org.jivesoftware.smack.MessageListener

I don’t think that this is caused by Smack.

Then why does it work if i build against asmack(we made a library project for android with it) sources or the older snapshots?

No changes in XMPPHelper besides renaming TCPConnection to XMPPConnection.

Hard to say with the provided information, as you didn’t even mention the version of the components involved… The rename is wrong btw, XMPPConnection has become TCPConnection first and is now named XMPPTCPConnection with the latest snapshot of aSmack. Connection has been renamed to XMPPConnection.

If dalvik isn’t able to dynamicall resolve, it’s usually a hint that the build process is fault and that it has used some outdated artifacts. But without knowing your build process, that is all I can say.

XMPPTCPConnection

Thats what i meant. Should be obvious since XMPPConnection cannot be instanciated.

We are using eclipse with ADT. No maven, no gradle. asmack jar is placed in libs folder. I manually emptied bin & gen folder.

Snapshot from 14.4(asmack-android-8-0.9.0-SNAPSHOT-2014-04-14) doenst work the one from 20.3 (asmack-android-8-0.9.0-SNAPSHOT-2014-03-20) does work.

Going to test a few more snapshots. Sadly I couldnt test it with a private project yesterday at home :confused:

Every other library dropped in the libs folder works fine.

EDIT: Every snapshot until 3-23(including) works finde.

Could it be a problem with this.

https://github.com/Flowdalic/Smack/commit/cc026a7e85698981e859a7ca726956fe31082a 49

Did you try “Clean Project” in eclipse?

If you have a ‘build.xml’ you could also try

ant clean

ant debug

and see if the resulting apk works.

Java 7 is supported by Android since Build Tools v19

It is working now, Java 7 indeed did broke the build. Installed new Build Tools Version - now everything is fine.

Thanks anyway

Always updated everything related to adt, but it didnt come to my mind that new build tools isnt an update but another one in the list.