为什么每当我创建一个新项目时,Eclipse会自动添加appcompat v7库支持? [英] Why does Eclipse automatically add appcompat v7 library support whenever I create a new project?

查看:136
本文介绍了为什么每当我创建一个新项目时,Eclipse会自动添加appcompat v7库支持?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为什么当我创建一个新项目时,Eclipse会自动添加 appcompat v7 库支持?



我正在创建一个简单的项目,其 MainActivity 应该扩展活动,但不会。 Eclipse自动添加操作栏支持。



如何在没有 appcompat 库的情况下创建一个简单的项目? FYI,我已经下载了最新版本的ADT,最近更新了一切。我正在使用Window 7 x64。



解决方案

如Android的支持库概述,默认情况下包括支持库是很好的做法,因为设备的种类多样化以及不同版本的Android之间存在的碎片(因此,提供的API)。



这就是为什么Android Android开发工具(ADT)在Eclipse中包含的templates.htmlrel =noreferrer>代码模板工具,默认情况下集成它们。

我注意到,您在样本中定位了 API 15 ,但是您需要的包装的miminum所需的SDK为 API 10 ,兼容性库可以提供了大量向后兼容的API。一个例子就是使用 Fragment API 在运行此系统旧版本的设备上的 API 11 (Android 3.0 Honeycomb) / p>

还要注意,默认情况下,您可以停用自动包含支持库


Why does Eclipse automatically add appcompat v7 library support whenever I create a new project?

I am creating a simple project whose MainActivity should extend Activity, but it does not. Eclipse automatically adds action bar support.

How do I create a simple project without the appcompat library? FYI, I have downloaded the latest version of ADT with everything updated recently. I am using Window 7 x64.

解决方案

As stated in Android's Support Library Overview, it is considered good practice to include the support library by default because of the large diversity of devices and the fragmentation that exists between the different versions of Android (and thus, of the provided APIs).

This is the reason why Android code templates tools included in Eclipse through the Android Development Tools (ADT) integrate them by default.

I noted that you target API 15 in your sample, but the miminum required SDK for your package is API 10, for which the compatibility libraries can provide a tremendous amount of backward compatible APIs. An example would be the ability of using the Fragment API which appeard on API 11 (Android 3.0 Honeycomb) on a device that runs an older version of this system.

It is also to be noted that you can deactivate automatic inclusion of the Support Library by default.

这篇关于为什么每当我创建一个新项目时,Eclipse会自动添加appcompat v7库支持?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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