Compiling aSmack
For a recent mobile project we used XMPP. It worked really well and I’m keen to use it again. But, in the process I learnt quite a lot about it. To start with, getting a working Android client was… interesting.
Android is a fascinating and interesting development environment. It may say Java on the tin, but it ain’t Java inside. And due to this, the otherwise great XMPP library Smack doesn’t work on Android. Instead you have to use the aSmack library. Which is actually a collection of patches and a build script. Compiled output is not to be found on the Internet. Additionally, the build script doesn’t work on Mac OS X. I built it on an Ubuntu Vagrant box. Here’s how.
Install Vagrant and VirtualBox.
mkdir asmack && cd asmack
vagrant box add lucid32 http://files.vagrantup.com/lucid32.box
vagrant init lucid32
vagrant ssh
sudo apt-get update
sudo apt-get install git-core openjdk-6-jdk curl vim subversion ant advancecomp
curl -O http://dl.google.com/android/android-sdk_r21.1-linux.tgz
tar -xzvf android-sdk_r21.1-linux.tgz
cd android-sdk-linux/
tools/android update sdk --no-ui
cd ..
git clone https://github.com/Flowdalic/asmack.git
cd asmack/
echo "sdk-location=/home/vagrant/android-sdk-linux" > local.properties
Edit build.xml. Remove the check-android-exists dependency from the compile-android target.
./build.bash
cp build/asmack-android-17.jar /vagrant
exit
And you will now have asmack-android-17.jar sitting in your current directory.
http://overwatering.org/blog/2013/05/compiling-asmack/
Compiling aSmack的更多相关文章
- [ZZ] A Proposal For Compiling Direct3D HLSL With LLVM (Written by Michael Larabel )
http://www.phoronix.com/scan.php?page=news_item&px=OTI2NA Note: Something very instersting to w ...
- RDLC An unexpected error occurred while compiling expressions. Native compiler return value: '-1073741511'
One of my web project, which has a rdlc file using some expressions, was working fine while developi ...
- openfire/spark/asmack 环境调试纪要
项目需要简单搭建openfire/spark/asmack的环境及程序demo,本文简单记录以免遗忘. 1.openfire/spark 是java编写的xmpp服务器及PC客户端,安装过程相当简单一 ...
- openfire+asmack搭建的安卓即时通讯(七) 15.5.27
本地化之章! 往期传送门: 1.http://www.cnblogs.com/lfk-dsk/p/4398943.html 2.http://www.cnblogs.com/lfk-dsk/p/441 ...
- android studio出现Error:compileSdkVersion android-x requires compiling with JDK 7问题
初装Android studio的童鞋可能或多或少会存在一些问题,比如出现Error:compileSdkVersion android-x requires compiling with JDK 7 ...
- [译] C track: compiling C programs.
原文:C track: compiling C programs. C track: compiling C programs. 尽管有些计算机语言(如 Schema 或者 Basic)通常使用交互式 ...
- openfire+asmack搭建的安卓即时通讯(四) 15.4.10
之前的教程不知道你们成功了没,,,没成功可以问我啊=-= 第四篇博文是要实现发送消息的功能. 首先在我们登陆后的活动的layout里添加这样的两个控件,一个EditText和一个Button用于发送数 ...
- openfire+asmack搭建的安卓即时通讯(一) 15.4.7
最进开始做一些android的项目,除了一个新闻客户端的搭建,还需要一个实现一个即时通讯的功能,参考了很多大神成型的实例,了解到operfire+asmack是搭建简易即时通讯比较方便,所以就写了这篇 ...
- maven 启动 报错 Fatal error compiling: 无效的目标发行版
http://news.tuxi.com.cn/news/119999990123162/31622105.html http://lyking2001.iteye.com/blog/837440 针 ...
随机推荐
- poj 1459 Power Network(增广路)
题目:http://poj.org/problem?id=1459 题意:有一些发电站,消耗用户和中间线路,求最大流.. 加一个源点,再加一个汇点.. 其实,过程还是不大理解.. #include & ...
- 使用simhash以及海明距离判断内容相似程度
算法简介 SimHash也即相似hash,是一类特殊的信息指纹,常用来比较文章的相似度,与传统hash相比,传统hash只负责将原始内容尽量随机的映射为一个特征值,并保证相同的内容一定具有相同的特征值 ...
- Samba 安全漏洞
漏洞名称: Samba 安全漏洞 CNNVD编号: CNNVD-201403-239 发布时间: 2014-03-17 更新时间: 2014-03-17 危害等级: 中危 漏洞类型: 信任管理 威 ...
- [HDU 1695] GCD
GCD Time Limit: 6000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submiss ...
- [NOI2005] 维修数列
1500: [NOI2005]维修数列 Time Limit: 10 Sec Memory Limit: 64 MBSubmit: 8397 Solved: 2530 Description In ...
- 声明顺序 (Bootstrap 编码规范)
相关的属性声明应当归为一组,并按照下面的顺序排列: Positioning Box model Typographic Visual 由于定位(positioning)可以从正常的文档流中移除元素,并 ...
- 32、handler更新控件值
import android.app.Activity; import android.os.Bundle; import android.os.Handler; import android.os. ...
- 如何获取android app的Activity
方法一 如有你有待测项目的源码,那么直接查看源码就好.如果没有,那么请联系有源码的同学,这是推荐方法. 方法二 直接把apk后缀改为zip格式,打开压缩包后再打开AndroidManifest.x ...
- 编程解读 + DOS搞笑开机GIF
- 富文本HTML编辑器UEditor
Baidu百度开源富文本HTML编辑器UEditor JS代码网 发表于: 2013-10-30 分类:HTML编辑器 点击:2133 UEditor是由百度web前端研发部开发所见即所得富文本H ...