在Android开发中,新建的项目可能因为缺少对sopport工程的引用而报错,可以这样解决。

1、项目右键 --> import --> Android --> Existing Android Code Into workspace

--> 选择..\sdk\extras\android\support\v7\appcompat(根据自己的文件存放路径选择)

--> 勾选copy projects into workspace --> finish

(若出现unable to resolve target 'android-16', 修改project.properties)

2、在项目中引用android.support.v7

项目右键 --> properties --> Android --> Library --> Add --> OK

在项目中引用android.support.v7的更多相关文章

  1. android.support.v7.app.AppCompatActivity不能使用的解决办法

    最近Android Studio 更新到4.0版本后,在构建项目时使用 android.support.v7.XX android.support.v4.XX 发现在xml文件中,原先我最常使用的Dr ...

  2. Android Support V7 包中 ActionBar的使用

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

  3. Android Studio 在项目中引用第三方jar包

    在Android Studio项目中引用第三方jar包的方法: 步骤: 1.在build.gradle文件中添加如下代码: 备注:要添加在Android作用域下 sourceSets { main { ...

  4. Android项目中引用到其他工程

    有的时候我们需要在现有的项目中引用到其他项目的资源和文件,当然我们可以将被引用的工程打成jar包,但是这有个缺点就是,这个改动比较麻烦,除非是被引用的工程的资源和源程序文件不再改动,可以这样做,否则每 ...

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

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

  6. 报错:Binary XML file line #7: Error inflating class android.support.v7.widget.RecyclerView

    近期学习RecyclerView,使用eclipse引用RecyclerView.编写完demo后编译没有问题,一执行就挂掉,错误例如以下: 07-22 23:05:34.553: D/Android ...

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

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

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

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

  9. android.support.v7.app.AppCompatActivity

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

随机推荐

  1. bzoj 4621 Tc605 思想+dp

    4621: Tc605 Time Limit: 15 Sec  Memory Limit: 128 MBSubmit: 328  Solved: 183[Submit][Status][Discuss ...

  2. font-family 定义的最后为什么要加一句sans-serif

    定义font-family时,最好在最后加一个sans-serif,这样如果所列出的字体都不能用,则默认的sans-serif字体能保证调用; W3C建议字体定义的时候,最后以一个类别的字体结束,例如 ...

  3. Nodejs 网络爬虫(资讯爬虫) 案例

    1. superagent superagent 是一个流行的nodejs第三方模块,专注于处理服务端/客户端的http请求.在nodejs中,我们可以使用内置的http等模块来进行请求的发送.响应处 ...

  4. HDU2824 The Euler function

    Time Limit: 1000MS   Memory Limit: 32768KB   64bit IO Format: %I64d & %I64u Description The Eule ...

  5. mysql 逻辑架构(三层)

    1.客户端(主要处理连接,授权认证,安全等). 2.MYSQL服务器层(核心服务功能都在这层,包括,查询解析,分析,优化,缓存以及所有的内置函数,所有跨存储引擎的功能都在这层实现:存储过程,触发器,视 ...

  6. webservice soapheader验证方法

    using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.We ...

  7. ubuntu安装mysql报错

    ubuntu换源后安装mysql报错: 原因:版本高,不兼容,只需要还原apt下载源,然后 sudo apt-get install mysql-server即可正常安装mysql

  8. C语言中的“>>”和“<<”

    http://baike.1688.com/doc/view-d1750791.html C语言中的“>>”和“<<” [标签:程序设计] 浏览次数:68937提问时间:200 ...

  9. ubuntu16.04安装flash plugin

    命令:apt-get install browser-plugin-freshplayer-pepperflash

  10. AC日记——Valued Keys codeforces 801B

    801B - Valued Keys 思路: 水题... 来,上代码: #include <cstdio> #include <cstring> #include <io ...