svn checkout http://android-vnc-viewer.googlecode.com/svn/trunk/ android-vnc-viewer-read-only |
必需插件: sqlitegen (这是必须的)该插件为androidVNC生成所需的AbstractConnectionBean类(AndroidVNC项目中用到该类)
SqliteGen项目主页:http://code.google.com/p/sqlitegen/
SqliteGen 是一个为 Android 开发人员准备的 Eclipse 插件,用来自动生成 SQLite 数据库的访问类,使用 Annotation 方式。sqlitegen 是一个Eclipse的Plugin。它通过标注接口自动生成访问sqlite 数据库的类。sqlitegen的官网:http://code.google.com/p/sqlitegen/
You will need to download 2 files to use the plugin.
(1)sqlitegen_eclipse_site_xxx.jar is a file containing an Eclipse plugin installation site in jar form. Download this file and configure it as a feature download site in the Eclipse software update panel; then you can install the plugin from it.
(2)com.antlersoft.android.db_xxx.jar is a library jar with the dependencies required by the code generated by the plugin. Add this file as a library to the build path of any Eclipse project that will use the plugin.
1. 安装sqlitegen 插件
需要下载两个文件 :
sqlitegen_eclipse_site_xxx.jar: 这是sqlitegen插件的离线安装包;下载地址:http://download.csdn.net/detail/songshimvp1/9296551
com.antlersoft.android.db_xxx.jar: 这是sqlitegen插件依赖的库文件。使用sqllitegen的项目需要吧这个库添加到Build Path中去。
在Eclipse中点击Help-->Install New Software-->Add-->Archive,选择下载的这个jar文件。安装完成后,会提示你重启Eclipse,那就重启Eclipse。然后右击androidVNC工程,看看是否有SQLiteGen annotation processing菜单,有的话,有没有选中?没有选中的话就点击选中,前面会出现一个对勾。如果都没有出现的话,那就说明安装不正确。
安装成功后,继续执行下述2的步骤。
2 .项目中启用 sqlitegen功能。
需要两步:
A.选择一个项目点击右键菜单 “Sqlitegen annotation Processing” 打上勾。
B。在项目的build path中加入 sqllitegen 的依赖库(PS : 第二个 DB 库(也就是这一步),Google code上的 VNC 项目里原本有了,就不用加了)
完成上面以后,clean,buildautomatically,应该就可以了。如果还是有红叉叉,再试一下下面两步。
3. 连接ZoomerWithKeys.
右击androidVNC,选择Build Path-->Link source, 选择ZoomerWithKeys工程所在目录,下一步完成就可以了。
这时候可以看到ZoomerWithKeys里面也有红色叉叉。
4.Console报错.
Android requires compiler compliance level 5.0 or 6.0.Found ''1.7” instead.Please use Android Tools >Fix Project Properties
Console里不停出现上面的错误。点击androidVNC项目,选择属性,选择Java Compiler,选择Compiler compliance level为1.7即可。经试验,1.6更好。