zoukankan      html  css  js  c++  java
  • android-support-v7-appcompat的配置使用

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

    (开发环境是ADT)

    Using Eclipse

    Create a library project based on the support library code:

    1. Make sure you have downloaded the Android Support Library using the SDK Manager.
    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.
  • 相关阅读:
    反恐24小时[第1季]——我打赌这是我第一次写观后感
    单片机设计-带时间显示的十字路口交通灯控制系统
    ASPxGridView控件的使用
    DataRow复制一行到另一个DataTable
    参数化、检查点、关联基本理解
    录制方式及一些脚本字段信息
    参数化的一些实践
    [转载]WinXp 自动运行的设置方法
    [转载]Windows Xp中如何设置自动登录
    [转载]WinXp 自动运行的设置方法
  • 原文地址:https://www.cnblogs.com/yshyee/p/3411693.html
Copyright © 2011-2022 走看看