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 针 ...
随机推荐
- Windows如何安装自定义服务
系统:Windows8 开发环境:Visual Studio 2012 开发平台 .Net Framework 4.5 找到系统盘的 C:\Windows\Microsoft.NET\Framewor ...
- Java [Leetcode 283]Move Zeroes
题目描述: Given an array nums, write a function to move all 0's to the end of it while maintaining the r ...
- web前端优化-温故知新系列(1)
有关web前端优化的博文,博客园中有许多网友的博客中都有介绍,而且详细.精准.楼主打算写这个博客,算是对自己一年工作来的一个总结和积累有些知识从别的地方拷贝过来的,但是都审查过. 引言: 1. 慢的页 ...
- JSON--List集合转换成JSON对象
转自:http://www.cnblogs.com/xmaomao/p/3184542.html 1. 简单的手动放置 键值对 到JSONObject,然后在put到JSONArray对象里 List ...
- [Bhatia.Matrix Analysis.Solutions to Exercises and Problems]ExI.2.8
For any matrix $A$ the series $$\bex \exp A=I+A+\frac{A^2}{2!}+\cdots+\frac{A^n}{n!}+\cdots \eex$$ c ...
- Hbase学习笔记(安装和基础知识及操作)
1.Hbase简介 1.面向列的分布式数据库 2. 以HDFS作为文件系统 3. 利用MapReduce处理Hbase中海量数据 4. ZookKeeper作为协调工具 5. sqoop提供Hbase ...
- 【原】Redis分区
Redis高级篇 分区 为什么分区? Redis中的分区主要有两个目的: 允许用多台机器的内存存放更大的数据集.如果没有分区,那么你只能存放单台机器内存的最大值的数据集. 允许用多核和多台机器提高计算 ...
- bzoj 1432 [ZJOI2009]Function(找规律)
[题目链接] http://www.lydsy.com/JudgeOnline/problem.php?id=1432 [思路] 找(cha)规(ti)律(jie) 分析戳这儿 click here ...
- HW6.11
import java.util.Scanner; public class Solution { public static void main(String[] args) { Scanner i ...
- 深入prototype源码之--Class
由于工作需要项目中要用prototype框架,所以这几天捣鼓了一下,研究了一下prototype 创建对象和类以及继承的一些源码,其实早在很久以前就接触prototype,然后直接看源码, 看着太蛋疼 ...