(二) 导入项目
将actionbarsherlock 和 slidingmenu 导入项目里
工程名为:
ExampleListActivity
actionbarsherlock
library
项目的结构层次
ExampleListActvity
|
|----------Library
|
|-------------actionbarsherlock
(三) 导包项目 与 排错
(1)导入项目后 打开 ExampleListActivity 的 properties 选择 Android 这一项
之后 可以看见缺少 /ABS 这个库 不用在意 删掉就好了 如下图 (图:1)
(2)打开library 的 properties 选择 Android 这一项
之后在library一项添加actionbar (如图2)
(3)完成上述步骤之后会报一个错误 表示2个不同版本的 android -support- v4 .jar 冲突了
解决办法: 删除library中的 android -support- v4 .jar 或者 使用相同的 android-support-v4.jar
错误如下:
Found 2 versions of android-support-v4.jar in the dependency list,
but not all the versions are identical (check is based on SHA-1 only at this time).
All versions of the libraries must be the same at this time.
Versions found are:
Path: /Users/baozi/Documents/Dev/HuihuaWorkspace/actionbarsherlock/libs/android-support-v4.jar
Length: 271754
SHA-1: 53307dc2bd2b69fd5533458ee11885f55807de4b
Path: /Users/baozi/Documents/Dev/HuihuaWorkspace/library/libs/android-support-v4.jar
Length: 758727
SHA-1: efec67655f6db90757faa37201efcee2a9ec3507
Jar mismatch! Fix your dependencies
(4)完成上述步骤之后 library 当中还存在错误:
找不到 getSupportA