直接将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. jmap命令结合mat插件分析内存泄露--OQL

    http://smallnetvisitor.iteye.com/blog/1826434 User.java package gc; import java.util.ArrayList; impo ...

  2. 【转】ipad死机了,无法退出,也无法关机,怎么办

    原文网址:http://zhidao.baidu.com/link?url=oTz6J78hmtCAKddhwu1ITUiPmLnVJIaA_v_0dZblPaIJUhuMdyTCdS6H2737GX ...

  3. java中的浮点(float)运算

    一.  关于浮点运算,需要说明的几点: 1.  在java中,进行浮点运算并不会处理例外情况,所以,即使除数为0,也不会有例外被抛出; 2.  当运算结果是溢出(Infinity)时,结果为Infin ...

  4. linux mount命令学习

    我们在下面这篇博文中已经有笼统的学习了文件系统的一些相关知识, http://blog.csdn.net/boyxulin1986/article/details/12107113 本篇我们主要是用来 ...

  5. POJ 3723 Conscription

    Conscription Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 6325   Accepted: 2184 Desc ...

  6. UVa 116: Undirectional TSP

    简单动态规划题.用取模实现第一行与最后一行连续,注意取字典序即可. 我的解题代码如下: #include <iostream> #include <cstdio> #inclu ...

  7. Python NTLK资料

    1.Creating a new corpus with NLTK http://stackoverflow.com/questions/4951751/creating-a-new-corpus-w ...

  8. for 的多重循环--java

    for的多重循环--java 利用for的多重循环打印出四种不同的三角形的图案. 图案如下: 4种不同三角形图案打印如下------------------******---------------- ...

  9. Android设置上下边框或者左右边框

    <?xml version="1.0" encoding="utf-8"?> <com.sunskyjun.fwproject.widgts. ...

  10. XShell连接 Linux系统,显示中文乱码

    摘要: Linux系统,中文显示乱码 XShell是一个强大的安全终端模拟软件,它支持SSH1, SSH2及 Microsoft Windows平台的Telnet NetSarang Xshell 4 ...