导入android.support.v7无法解析 [英] The Import android.support.v7 cannot be resolved

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

问题描述

我是Android的新手。目前,我已经安装了 adt-bundle-windows-x86-20131030.zip (Windows 32位),并成功安装了Android SDK和Eclipse。此外,我已经更新了Android SDK管理器中的所有内容。现在,我在Android v-4.4.2中工作



我的项目运行成功,但是当我导入 android.support.v7.app。 ActionBarActivity; import android.support.v7.app.ActionBar; 该项目将不会调试。我收到错误导入android.support.v7无法解析



我在Google中搜索并安装 Android支持库然后在我的项目中添加了 v7


  1. 文件 - >导入(android-sdk\extras\android\support\v7)。选择appcompat

  2. Project-> properties-> Android。在部分库添加中,选择appCompat

截图





appCompat 中成功添加,但仍然会收到错误。

解决方案


  1. 转到导航器中的项目,右键单击属性。


  2. 转到Java Build路径选项卡在左边。


  3. 转到顶部的图书馆标签


  4. 点击添加外部jar。 / p>


  5. 转到ADT Bundle文件夹,转到sdk / extras / android / support / v7 / appcompat / libs。


  6. 选择文件android-support-v7-appcompat.jar


  7. 转到订单并导出并选中您的新jar旁边的框。


  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天全站免登陆