博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
android-support-v7-appcompat的配置使用
阅读量:6832 次
发布时间:2019-06-26

本文共 1837 字,大约阅读时间需要 6 分钟。

直接将android-support-v7-appcompat.jar包拷贝到项目的libs/下面是不能使用的,具体做法官方文档给出了详细说明:

(开发环境是ADT)

Create a  based on the support library code:

  1. Make sure you have downloaded the Android Support Library using the .
  2. Create a library project and ensure the required JAR files are included in the project's build path:
    1. Select File > Import.
    2. Select Existing Android Code Into Workspace and click Next.
    3. Browse to the SDK installation directory and then to the Support Library folder. For example, if you are adding theappcompat project, browse to <sdk>/extras/android/support/v7/appcompat/.
    4. Click Finish to import the project. For the v7 appcompat project, you should now see a new project titled android-support-v7-appcompat.
    5. In the new library project, expand the libs/ folder, right-click each .jar file and select Build Path > Add to Build Path. For example, when creating the the v7 appcompat project, add both the android-support-v4.jar andandroid-support-v7-appcompat.jar files to the build path.
    6. Right-click the project and select Build Path > Configure Build Path.
    7. In the Order and Export tab, check the .jar files you just added to the build path, so they are available to projects that depend on this library project. For example, the appcompat project requires you to export both the android-support-v4.jar and android-support-v7-appcompat.jar files.
    8. Uncheck Android Dependencies.
    9. Click OK to complete the changes.

You now have a library project for your selected Support Library that you can use with one or more application projects.

Add the library to your application project:

  1. In the Project Explorer, right-click your project and select Properties.
  2. In the Library pane, click Add.
  3. Select the library project and click OK. For example, the appcompat project should be listed as android-support-v7-appcompat.
  4. In the properties window, click OK.

 

转载地址:http://oytkl.baihongyu.com/

你可能感兴趣的文章
Extjs- Ext.extend函数的使用
查看>>
hdu 1172(暴力题)
查看>>
Oracle to_char()
查看>>
Lucene4Net以及盘古分词
查看>>
thickbox问题
查看>>
HttpApplication事件&ASP.NET页面周期
查看>>
Java事务之八——分布式事务(Spring+JTA+Atomikos+Hibernate+JMS)
查看>>
(转)S5PV210--1---210启动方式和代码前16字节
查看>>
Zlib与GZip - woaidongmao - C++博客
查看>>
ASP.NET那点不为人知的事(四)
查看>>
ExtJs 4.2 treePanel
查看>>
typeof和instanceof的区别
查看>>
Windows 7下面安装VMware、BackTrack5(BT5)、minidwep-gtk
查看>>
Java中获取键盘输入值的三种方法
查看>>
最少硬币问题(受限)NK1132
查看>>
ltrace查看库调用
查看>>
spring3.0事务配置及expression表达式介绍
查看>>
head设计模式 01
查看>>
PostgreSQL的神秘现象
查看>>
windows下安装redis
查看>>