如何创建不使用支持库一个新的Andr​​oid项目? [英] How to create a new android project without using support libraries?

查看:126
本文介绍了如何创建不使用支持库一个新的Andr​​oid项目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

更新我的DDMS后,我意识到,每当我想创建一个新的项目,称为支持库 appcompatv7 被添加到我的项目自动窗口。

After updating my DDMS i realized that whenever i want to create a new project, a support library called appcompatv7 is being added to my project window automatically.

和这个库增加了一些feauters这是我从来没有使用过。我只是想有一个空的活动和一个 activity_main.xml 创建一个简单的Andr​​oid项目。但是,该库还添加了一个名为xml文件的 activity_fragment.xml

And this library adds some feauters which i never used before. I just want to create a simple android project with one Blank Activity and one activity_main.xml. But this library also adds an xml file named activity_fragment.xml

所以,我怎么可以创建不使用此支持库一个简单的项目? 如果有人把事情说清楚我会的AP preciated。

So how can i create a simple project without using this support library? If somebody make things clear i will appreciated.

推荐答案

当您设置最小目标在API级别13或14(蜂窝或冰淇淋三明治)东西,所以这些应用程序可以使用,该AppCompat库添加有一个动作条(除其他事项外)。在另一方面,支持库(V4),需要在下面的API级别16什么ViewPagers(一ViewPager的FragmentAdapters在API级别14和15用碎片的支持库)。这是只有在支持V13的ViewPager适配器开始使用新的纯粹的片段。

The AppCompat library is added when you set your min target to something under API level 13 or 14. (HoneyComb or Ice Cream Sandwich) so those apps can use and have an ActionBar (among other things). The support library (v4) on the other hand is required for ViewPagers in anything below API Level 16 (the FragmentAdapters of a ViewPager use Fragments from the Support Library in API level 14 and 15). It's only in Support V13 that the ViewPager Adapters start using the new "pure" Fragments.

所以,如果你想要一个纯粹的/不支持的Andr​​oid应用程序,你可以去API级别14,但你可能仍然需要支持V4库一些事情。

So if you want a "pure/non support" Android App, you can go for API level 14, but you might still need the Support V4 library for some things.

不知道什么原因(我敢肯定,他们有一些),谷歌直接添加一些东西到兼容性库(反之亦然)只所以有时你需要它,即使你真的不希望所有的code ...

For unknown reasons (I'm sure they had some), Google added some stuff directly into the compatibility library (and viceversa) only so sometimes you need it even when you really don't want all the code…

这篇关于如何创建不使用支持库一个新的Andr​​oid项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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