Google的兼容包问题【转】
转自:http://blog.sina.com.cn/s/blog_3e28c8a50101g14g.html
项目之前好好的,今天开Eclipse,,出错。
错误Error retrieving parent for item: No resource found that matches the given name 'Theme.AppCompat.Light'.
观察R.JAVA有生成,找了styles,改了版本,都不行。
后来发现我之前把appcompat_v7_2和appcompat_v7给close 了,就是用Close Project,
Open 这两个 Project,错误就消失了。
appcompat_v7是google自己的兼容包
,在建立Android Application的时候,只需要将Minimum Required SDK选择到Android 4.0版本(即API 14),便不会出现烦人的Appcompat_V7内容了。
至于ADT升级为22.6.0版本之后所出现的其他问题,也有其他的方法:
1. 我不要新的,继续用回我原来的版本。 请看转载链接:解决方法一
2. 同时出现的问题,还有Android模拟器无法创建。亲,也请看转载链接:解决方法二
3. 我嘛, 直接换成adt-bundle开发了。因为前两天实在没有解决办法。发现adt-bundle配置都省了。
感谢各位,希望你们也能成功的解决。
关于这个库可以看GOOGLE的文档: http://developer.android.com/tools/support-library/features.html
Support Library Features
The Android Support Library package contains several libraries that can be included in your application. Each of these libraries supports a specific range of Android platform versions and set of features.
This guide explains the important features and version support provided by the Support Libraries to help you decide which of them you should include in your application. In general, we recommend including the v4 support and v7 appcompat libraries, because they support a wide range of Android versions and provide APIs for recommended user interface patterns.
In order to use any of the following libraries, you must download the library files to your Android SDK installation. Follow the directions for downloading the Support Libraries in Support Library Setup to complete this step. You must take additional steps to include a specific Support Library in your application. See the end of each library section below for important information on how to include the library in your application.
v4 Support Library
This library is designed to be used with Android 1.6 (API level 4) and higher. It includes the largest set of APIs compared to the other libraries, including support for application components, user interface features, accessibility, data handling, network connectivity, and programming utilities. Here are a few of the key classes included in the v4 library:
- App Components
Fragment- Adds support encapsulation of user interface and functionality with Fragments, enabling applications provide layouts that adjust between small and large-screen devices.
NotificationCompat- Adds support for rich notification features.
LocalBroadcastManager- Allows applications to easily register for and receive intents within a single application without broadcasting them globally.
- User Interface
ViewPager- Adds aViewGroupthat manages the layout for the child views, which the user can swipe between.PagerTitleStrip- Adds a non-interactive title strip, that can be added as a child ofViewPager.PagerTabStrip- Adds a navigation widget for switching between paged views, that can also be used withViewPager.DrawerLayout- Adds support for creating a Navigation Drawer that can be pulled in from the edge of a window.SlidingPaneLayout- Adds widget for creating linked summary and detail views that appropriately adapt to various screen sizes.
- Accessibility
ExploreByTouchHelper- Adds a helper class for implementing accessibility support for custom views.
AccessibilityEventCompat- Adds support forAccessibilityEvent. For more information about implementing accessibility, see Accessibility.
AccessibilityNodeInfoCompat- Adds support forAccessibilityNodeInfo.
AccessibilityNodeProviderCompat- Adds support forAccessibilityNodeProvider.
AccessibilityDelegateCompat- Adds support forView.AccessibilityDelegate.
- Content
Loader- Adds support for asynchronous loading of data. The library also provides concrete implementations of this class, includingCursorLoaderandAsyncTaskLoader.
FileProvider- Adds support for sharing of private files between applications.
There are many other APIs included in this library. For complete, detailed information about the v4 Support Library APIs, see the android.support.v4 package in the API reference.
This library is located in the /extras/android/support/v4/ directory after you download the Android Support Libraries. This library does not contain user interface resources. To include it in your application project, follow the instructions for adding libraries without resources.
The Gradle build script dependency identifier for this library is as follows:
com.android.support:support-v4:18.0.+
This dependency notation specifies the release version 18.0.0 or higher.
v7 Libraries
There are several libraries designed to be used with Android 2.1 (API level 7) and higher. These libraries provide specific feature sets and can be included in your application independently from each other.
v7 appcompat library
This library adds support for the Action Bar user interface design pattern.
Note: This library depends on the v4 Support Library. If you are using Ant or Eclipse, make sure you include the v4 Support Library as part of this library's classpath.
Here are a few of the key classes included in the v7 appcompat library:
ActionBar- Provides an implementation of the action bar user interface pattern. For more information on using the Action Bar, see the Action Bar developer guide.ActionBarActivity- Adds an application activity class that must be used as a base class for activities that uses the Support Library action bar implementation.ShareActionProvider- Adds support for a standardized sharing action (such as email or posting to social applications) that can be included in an action bar.
This library is located in the /extras/android/support/v7/appcompat/ directory after you download the Android Support Libraries. This library contains user interface resources. To include it in your application project, follow the instructions for adding libraries with resources.
The Gradle build script dependency identifier for this library is as follows:
com.android.support:appcompat-v7:18.0.+
This dependency notation specifies the release version 18.0.0 or higher.
v7 gridlayout library
This library adds support for the GridLayout class, which allows you to arrange user interface elements using a grid of rectangular cells. For detailed information about the v7 gridlayout library APIs, see the android.support.v7.widgetpackage in the API reference.
This library is located in the /extras/android/support/v7/gridlayout/ directory after you download the Android Support Libraries. This library contains user interface resources. To include it in your application project, follow the instructions for adding libraries with resources.
The Gradle build script dependency identifier for this library is as follows:
com.android.support:gridlayout-v7:18.0.+
This dependency notation specifies the release version 18.0.0 or higher.
v7 mediarouter library
This library provides MediaRouter, MediaRouteProvider, and related media classes that support the Google Cast developer preview.
In general, the APIs in the v7 mediarouter library provide a means of controlling the routing of media channels and streams from the current device to external screens, speakers, and other destination devices. The library includes APIs for publishing app-specific media route providers, for discovering and selecting destination devices, for checking media status, and more. For detailed information about the v7 mediarouter library APIs, see the android.support.v7.mediapackage in the API reference.
The v7 mediarouter library is located in the /extras/android/support/v7/mediarouter/ directory after you download the Android Support Library. It's provided as a library project with a dependency on the v7 appcompat library, so you'll need to include both libraries in your build path when setting up your project. For more information on how to set up your project, follow the instructions in adding libraries with resources. If you are developing in Eclipse/ADT, make sure to include both the android-support-v7-mediarouter.jar and android-support-v7-appcompat.jar files.
If you are using Android Studio, all you need to do is specify the Gradle build script dependency identifiercom.android.support:support-v7-mediarouter:, where "18.0.0" is the minimum revision at which the library is available. For example:
com.android.support:mediarouter-v7:18.0.+
The v7 mediarouter library APIs introduced in Support Library r18 are subject to change in later revisions of the Support Library. At this time, we recommend using the library only in connection with the Google Cast developer preview.
v8 Support Library
This library is designed to be used with Android (API level 8) and higher. It adds support for the RenderScript computation framework. These APIs are included in the android.support.v8.renderscript package. You should be aware that the steps for including these APIs in your application is very different from other support library APIs. For more information about using these APIs in your application, see the RenderScript developer guide.
Note: Use of RenderScript with the support library is supported with the Android Eclipse plugin and Ant build tools. It isnot currently supported with Android Studio or Gradle-based builds.
v13 Support Library
This library is designed to be used for Android 3.2 (API level 13) and higher. It adds support for the Fragment user interface pattern with the (FragmentCompat) class and additional fragment support classes For more information about fragments, see the Fragments developer guide. For detailed information about the v13 Support Library APIs, see theandroid.support.v13 package in the API reference.
This library is located in the /extras/android/support/v13/ directory after you download the Android Support Libraries. This library does not contain user interface resources. To include it in your application project, follow the instructions for adding libraries without resources.
The Gradle build script dependency identifier for this library is as follows:
com.android.support:support-v13:18.0.+
This dependency notation specifies the release version 18.0.0 or higher.
Google的兼容包问题【转】的更多相关文章
- 关于appcompat_v7兼容包的详细说明
1.appcompat_v7包的由来? appcompat_v7是Google提供的向下兼容包,是针对API level 7(Android2.1)及以上版本所开发的,其作用是为了让兼容低版本API( ...
- android v4兼容包
一句话解释android兼容包就是:支持更多的组件,样式更好看了.好粗糙的解释啊! 我们都知道Android一些SDK比较分裂,为此google官方提供了Android Support Library ...
- 转:android Support 兼容包详解
本文转自stormzhang的ANDROID SUPPORT兼容包详解 背景 来自于知乎上邀请回答的一个问题Android中AppCompat和Holo的一个问题?, 看来很多人还是对这些兼容包搞不清 ...
- 33、Android Support兼容包详解(转载)
原文转自:微信分享 2015-03-31 22:11 背景 来自于知乎上邀请回答的一个问题Android中AppCompat和Holo的一个问题?, 看来很多人还是对这些兼容包搞不清楚,那么干脆写篇博 ...
- Android SDK中的Support兼容包详解
这篇文章主要介绍了Android SDK中的Support兼容包详解,本文详细区分了Support Library的版本区别.各种Theme的概念和使用注意事项等内容,需要的朋友可以参考下 背景 来自 ...
- Eclipse导入 appcompat,design兼容包
从Android studio推出1.0正式版后,就一直在as上开发项目,但是最近要测试一个项目,是eclipse结构,导入as后,是各种报错信息,决定改成eclipse. 其中项目中用到了ppcom ...
- 在Eclipse添加Android兼容包( v4、v7 appcompat )
昨天添加Android兼容包,碰到了很多问题,在这里记录一下,让后面的路好走. 如何选择兼容包, 请参考Android Support Library Features(二) 一.下载Support ...
- Android兼容包multidex的开发和构建方法
在Android开发中,函数方法超过65k限制后,我们就常常会用到multidex分包解决,但是multidex的配置,对系统apk的构建.签名.打包复杂性大大的增加,严重的降低了构建效率.那这个问题 ...
- Android MultiDex兼容包怎么使用?
在Android系统中安装应用的时候,需要对Dex进行优化,但由于其处理工具DexOpt的限制,导致其id的数目不能够超过65536个.而MultiDex兼容包的出现,就很好的解决了这个问题,它可以配 ...
随机推荐
- python成长之路第三篇(1)_初识函数
目录: 函数 为什么要使用函数 什么是函数 函数的返回值 文档化函数 函数传参数 文件操作(二) 1.文件操作的步骤 2.文件的内置方法 函数: 一.为什么要使用函数 在日常写代码中,我们会发现有很多 ...
- jquery跨域访问解决方案(转)
客户端“跨域访问”一直是一个头疼的问题,好在有jQuery帮忙,从jQuery-1.2以后跨域问题便迎刃而解.由于自己在项目中遇到跨域问题,借此机会对跨域问题来刨根问底,查阅了相关资料和自己的实践,算 ...
- 添加解压缩版Tomcat到系统服务
一.安装服务 在命令行中进入/Tomcat路径/bin/,执行“service.bat install”: 说明:1.服务名和显示名称:service.bat中设置了默认的服务名称,不同版本分别命名为 ...
- Arduino红外遥控系列教程2013——红外转码
教程三:红外转码教程——用电视遥控器取代机顶盒遥控器 前言前段时间看到了使用红外遥控的X-Bot机器人[链接],感觉很有意思.最近开始玩Arduino与红外,一方面打算将来用于BOXZ的之间的通讯控制 ...
- Delphi Windows API判断文件共享锁定状态(OpenFile和CreateFile两种方法)
一.概述 锁是操作系统为实现数据共享而提供的一种安全机制,它使得不同的应用程序,不同的计算机之间可以安全有效地共享和交换数据.要保证安全有效地操作共享数据,必须在相应的操作前判断锁的类型,然后才能确定 ...
- c# 正则表达式对网页进行内容抓取
原文 c# 正则表达式对网页进行内容抓取 搜索引擎中一个比较重要的环节就是从网页中抽取出有效内容.简单来说,就是吧HTML文本中的HTML标记去掉,留下我们用IE等浏览器打开HTML文档看到的部分(我 ...
- Memory Leak(内存泄漏)问题总结(转)
最近听了一些关于Memory Leak(内存泄漏)的seminar,感觉有些收获,所以留个记录,并share给朋友. 1 什么是Memory Leak. Memory Leak是指由于错误或不完备的代 ...
- HTML5 Audio时代的MIDI音乐文件播放
大家都知道,HTML5 Audio标签能够支持wav, webm, mp3, ogg, acc等格式,但是有个很重要的音乐文件格式midi(扩展名mid)却在各大浏览器中都没有内置的支持,因为mid文 ...
- 【HDU】1754 I hate it ——线段树 单点更新 区间最值
I Hate It Time Limit: 9000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total S ...
- x/nfu-用gdb查看内存
用gdb查看内存 2007-12-08 12:43 用gdb查看内存 格式: x /nfu <addr> 说明x 是 examine 的缩写 n表示要显示的内存单元的个数 f表示显示方式, ...
至于ADT升级为22.6.0版本之后所出现的其他问题,也有其他的方法: