导入android.support.v7不能得到解决 [英] The Import android.support.v7 cannot be resolved

查看:773
本文介绍了导入android.support.v7不能得到解决的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是新来的Andr​​oid。目前,我有 adt-bundle-windows-x86-20131030.zip (视窗32位)安装 - 并且已经成功安装了Android SDK和Eclipse。另外,我更新了一切在Android SDK管理器。现在,我在Android的V-4.4.2工作

我的项目成功运行,但是当我输入 android.support.v7.app.ActionBarActivity; 进口android.support.v7.app .ActionBar; 的项目将不能进行调试。我得到的错误导入android.support.v7解决不了

我搜索谷歌和安装 Android的支持库加入 V7 在我的项目。

  1. 文件 - >导入(Android的SDK \演员\机器人\ SUPPORT \第7版)。选择appcompat
  2. 在项目 - >属性 - > Android系统。在部分库添加,然后选择appCompat

截图

成功 appCompat 添加,但仍我仍然得到错误。

解决方案
  1. 转到您的项目在导航器中,右键单击属性。

  2. 转到左边的Java构建路径选项卡。

  3. 转至顶部库选项卡。

  4. 点击添加外部JAR。

  5. 转到您的ADT包文件夹,​​去SDK /演员/安卓/支持/ V7 / appcompat /库。

  6. 选择该文件Android的支持-V7-appcompat.jar

  7. 进入购买和出口,并检查框旁边的新的罐子。

  8. 点击确定。

I am new to Android. Currently, I have the adt-bundle-windows-x86-20131030.zip (Windows 32 bit) installed - and have successfully installed the Android SDK and Eclipse. Also, I have updated everything in the Android SDK manager. Now, I am working in Android v-4.4.2

My project runs successfully, but when I import android.support.v7.app.ActionBarActivity; and import android.support.v7.app.ActionBar; the project won't debug. I get the error The Import android.support.v7 cannot be resolved

I searched in Google and installed Android Support Library then added v7 in my project.

  1. File->Import (android-sdk\extras\android\support\v7). Choose "appcompat"
  2. Project-> properties->Android. In the section library "Add" and choose "appCompat"

Screenshot

Successfully added in appCompat but still I am still getting the error.

解决方案

  1. Go to your project in the navigator, right click on properties.

  2. Go to the Java Build Path tab on the left.

  3. Go to the libraries tab on top.

  4. Click add external jars.

  5. Go to your ADT Bundle folder, go to sdk/extras/android/support/v7/appcompat/libs.

  6. Select the file android-support-v7-appcompat.jar

  7. Go to order and export and check the box next to your new jar.

  8. Click ok.

这篇关于导入android.support.v7不能得到解决的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆