直接将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.

android-support-v7-appcompat的配置使用的更多相关文章

  1. xamarin android 报错 Could not load assembly 'Xamarin.Android.Support.v7.AppCompat

    严重性 代码 说明 项目 文件 行 禁止显示状态 错误 Exception while loading assemblies: System.IO.FileNotFoundException: Cou ...

  2. Android android.support.v7.appcompat.R$styleable

    引入第三方jar或者library时比如自定义控件.突然报如下错误: 07-17 09:22:25.430: E/CrashHandler(14102): Caused by: android.vie ...

  3. Android增加v7 appcompat源码

    1.File ---- Import---- Existing Android Code Into Workspace 2.选择 <sdk>/extras/android/support/ ...

  4. android 使用android.support.v7 添加ActionBar

    当需要在 android 7或更高的版本使用 ActionBar,则可以通过继承ActionBarActivity来实现, 网上有一个开源项目来兼容老版本显示ActionBar的效果:ActionBa ...

  5. 在项目中引用android.support.v7

    在Android开发中,新建的项目可能因为缺少对sopport工程的引用而报错,可以这样解决. 1.项目右键 --> import --> Android --> Existing ...

  6. 配置android.support.v7.widget.Toolbar 搜索框样式

    AndroidManifest.xml <?xml version="1.0" encoding="utf-8"?> <manifest xm ...

  7. android.support.v7.app.AppCompatActivity

    1.Android Studio (api 23) 新建项目的时候 Activity public class MainActivity extends AppCompatActivity 2.系统默 ...

  8. Android Support V7 包中 ActionBar的使用

    以下示例为API<11,因为API>=11时本来就有ActionBar可以使用,所以不猜讨论范围之内 今天Google发布了最新的API 18,包括众多新的性能,正好最近在研究Action ...

  9. java.lang.NoSuchFieldError: No static field abc_ic_ab_back_mtrl_am_alpha of type I in class Landroid/support/v7/appcompat/R$drawable

    出现java.lang.NoSuchFieldError: No static field abc_ic_ab_back_mtrl_am_alpha of type I in class Landro ...

  10. classes could not be found: - android.support.v7.internal.app.WindowDecorActionBar问题的解决方法

    转载至----http://my.oschina.net/u/2425146/blog/546649?fromerr=aDYrFDVx.仅作个人收藏使用,有转载的朋友请连续原作者,谢谢 刚刚进入stu ...

随机推荐

  1. java基本类型作为成员变量时的初始值

    package primitivetypedefaultvalue; public class ListDefaultValue { public static void main(String[] ...

  2. CH Round #55 - Streaming #6 (NOIP模拟赛day2)

    A.九九归一 题目:http://ch.ezoj.tk/contest/CH%20Round%20%2355%20-%20Streaming%20%236%20(NOIP模拟赛day2)/九九归一 题 ...

  3. java调优随记-堆和栈

    基础知识: 关于堆和栈,堆和栈是程序运行的关键,关于堆和栈的定义和解释可自行搜索,我比较认可以程序运行过程中他们扮演的角色作为对比的点:堆是存储的单位,而栈是程序运行时的单位.栈解决的是程序的运行问题 ...

  4. Activity — 4 launch mode

    launchMode在多个Activity跳转的过程中扮演着重要的角色,它可以决定是否生成新的Activity实例,是否重用已存在的Activity实例,是否和其他Activity实例公用一个task ...

  5. C# 同步/并发队列ConcurrentQueue (表示线程安全的先进先出 (FIFO) 集合)

    http://msdn.microsoft.com/zh-cn/library/dd267265(v=vs.110).aspx static void Main(string[] args) { // ...

  6. HDU_2023——求平均成绩

    Problem Description 假设一个班有n(n<=50)个学生,每人考m(m<=5)门课,求每个学生的平均成绩和每门课的平均成绩,并输出各科成绩均大于等于平均成绩的学生数量. ...

  7. 个性化品牌开始繁荣?为设计师和代工厂牵线的平台Maker's Row获得100万美元融资 | 36氪

    个性化品牌开始繁荣?为设计师和代工厂牵线的平台Maker's Row获得100万美元融资 | 36氪 个性化品牌开始繁荣?为设计师和代工厂牵线的平台Maker's Row获得100万美元融资

  8. JavaScript 自动分页插件 datatables

    DataTables Table plug-in for jQuery https://www.datatables.net/

  9. 高性能 Socket 组件 HP-Socket v3.2.1-RC4 公布

    HP-Socket 是一套通用的高性能 TCP/UDP Socket 组件,包括服务端组件.client组件和 Agent 组件,广泛适用于各种不同应用场景的 TCP/UDP 通信系统,提供 C/C+ ...

  10. 屏幕分辨率(QQVGA、QVGA、VGA、XGA、WXGA、WUXGA和WSXGA+)

    TFT屏幕 TFT ( Thin Film Transistor 薄膜晶体管) ,是有源矩阵类型液晶显示器(AM-LCD)中的一种,TFT在液晶的背部设置特殊光管,能够“主动的”对屏幕上的各个独立的象 ...