1

I am developing an Android application for multi-account instant messaging and i need to use a XMPP library to do the job; i am currently developing with Eclipse under Windows 7 OS;
I have carefully read some threads regarding XMPP libraries on Android such as:

I decided to use the aSmack library patched and developed by Flowdalic present at https://github.com/Flowdalic/asmack because seems to me the best solution.

My problem is that I cannot build the library on my environment, for eclipse under Windows. I don't know how to succesfully build the library to include in my android project.

It seems that build environment of this library is prepared for unix systems: if so, what can I do to build this library under windows or what can i do to include a functional version of this library in my project? Or may I can use another library (Beem for example) if it can be built under windows?
Or maybe someone could provide me the .jar files of a library already built?

Thanks to all in advance for your help

Community
  • 1
  • 1
  • 1
    define "cannot build" (also, that part of java is actually os agnostic) – njzk2 Nov 21 '12 at 13:57
  • at this link https://github.com/Flowdalic/asmack there is the build environment for asmack library, and in the README file are written the rules to compile the library: 1) copy local.properties.example to local.properties and set the Android SDK path (e.g. sdk-location=/opt/android-sdk-update-manager/ on a gentoo system) 2) Run build.bash so, how can i run this build.bash on windows? – extreme_coder Nov 21 '12 at 14:01
  • i'd say install linux, but that's probably not helping. However, consider reading a little further that same github page and find a link to the download page, which contains packaged jars. – njzk2 Nov 21 '12 at 14:54
  • Yes, there is a jar compiled, but is outdated; anyway i have already tried to use that jar, i built my app succesfully but when i tried to run the application, it crashed immediately with a VerifyError Exception, derscribing the absence of some class files that composes the library ... I also dont't know how to solve this – extreme_coder Nov 21 '12 at 15:12
  • lets start with this. can you post the stacktrace for this error ? – njzk2 Nov 21 '12 at 16:40
  • After further tries, now i'm able to use that .jar downloaded from the link without VerifyError exception!! But the main question of this thread remains: it is possible to build this library up to date from the repository https://github.com/Flowdalic/asmack under windows?? – extreme_coder Nov 21 '12 at 17:18
  • 1
    absolutely! you can use cygwin or some equivalent environement, or you can translate the script, which is not very complex. it does checkouts of various elements (via svn, git mercurial) then it finds an sdk and uses it to compile. I think the important line is `xargs -I{} -n 1 $XARGS_ARGS ant -Dandroid.version={} -Djar.suffix="${1}" compile-android`. However, windows is really not the best environement. particularly for that kind of things. – njzk2 Nov 21 '12 at 17:22
  • i will try with cygwin first which is the simpler solution, and will reports the results, thanks – extreme_coder Nov 21 '12 at 17:31
  • Another solution would be a VM (e.g. VirtualBox) running debian/ubuntu/etc. for building aSmack. You just have to make sure that all tools needed for the build process are installed. – Flow Nov 22 '12 at 09:49
  • Hi, Do you solve this issue? – Ihor Bykov Sep 30 '14 at 16:34

1 Answers1

1

I recommend to install a debian/ubuntu system in a VM like VirtualBox to build aSmack on Windows. Make sure to have all the build dependencies installaded, often a

sudo apt-get install build-essentials

will do the trick.

Flow
  • 23,572
  • 15
  • 99
  • 156