永发信息网

eclipse中怎样导入android-support-v7-appcompat

答案:2  悬赏:50  手机版
解决时间 2021-02-26 03:45
eclipse中怎样导入android-support-v7-appcompat
最佳答案
make sure you have downloaded the android support library using the sdk manager.

create a library project and ensure the required jar files are included in the project's build path:

select file > import.

select existing android code into workspace and click next.

browse to the sdk installation directory and then to the support library
folder. for example, if you are adding the cardview project, browse to
/extras/android/support/v7/cardview/.

click finish to import the project. for the v7 cardview project, you
should now see a new project titled android-support-v7-cardview.

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
cardview project, add the android-support-v7-cardview.jar file to the
build path.

right-click the library project folder and select build path > configure build path.

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 cardview project requires you to
export the android-support-v7-cardview.jar file.

uncheck android dependencies.

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:

in the project explorer, right-click your project and select properties.

in the category panel on the left side of the dialog, select android.

in the library pane, click the add button.

select the library project and click ok. for example, the appcompat project should be listed as android-support-v7-cardview.

in the properties window, click ok.

需要注意project.properties里的target尽量高点比较好,如果低了可能会出现类似

no
resource found that matches the given name '@style/theme.appcompat.light'的问题。我选的是23。
全部回答
有如下两种方法可以在Android studio中导入appcompat-v7。方法1:在项目的build.gradle文件里,用传统的自动依赖处理方式: compile ‘com.Android.support:appcompat-v7:+’,然后rebuild就可以了。 方法2: 1、直接在Module上右键Open Module Settings,如下图: 2、选中Modules,打开Dependencies选项卡,点击右边的‘+’号,选第一个Library Dependency,如下图: 3、选中appcompat-v7即可
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
一段公路已经修好了437米,比没修的少126米,这
iphone5换基带、字库、硬盘后影响升级和使用
会计需要应酬吗? 会计的应酬属于危险的还是
焖子店地址在什么地方,想过去办事
新鲜石斛怎么吃
村民有权利看本村的扶贫档案吗?
祺羊纺织地址在哪,我要去那里办事
商业银行内部控制的主要内容是( )。A.内部业
轮子边缘的线速度相等该怎样理解
北京奥林匹克公园北门我想知道这个在什么地方
谁有穿过没洗的丝袜或内内啊
纯水机的电导率国标要求多少,原水和纯水的比
芜湖市大兵五金机电商行地址有知道的么?有点
陈某,男,32岁。腰酸,遗精,两足软弱,眩晕
五月十号是什么日子
推荐资讯
vmware workstation怎么导入虚拟机
南京产后修复哪家好,你好,生完孩子瘦不下来
4/15加0.8×7/8用简便运算
在网上认识一个妹子想和他处cp怎么开口
4÷5=( )分之( )=80%=( )折( )(小数)
我想买房子,可不知道怎样朝向的房子好?是座
什么叫全网发行的股票
龙蟠中路中国石化加油卡办理点儿
苹果刷机基带是什么
兴宁一中什么时候到校
后头凹我想知道这个在什么地方
iphone4s玩游戏突然没声音???
正方形一边上任一点到这个正方形两条对角线的
阴历怎么看 ?