Java 如何在没有 appcompat_v7 的情况下创建新项目

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/22555568/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-13 16:28:11  来源:igfitidea点击:

how can I create a new project without appcompat_v7

javaandroideclipsesdkadt

提问by Ankit Kumar

I am unable to get why appcompat_v7 is created automatically... finding it very irritating.. please someone help to get rid off this problem. I tried to create new project and found like this for every newly created project.

我不明白为什么 appcompat_v7 是自动创建的...发现它很烦人...请有人帮助摆脱这个问题。我尝试创建新项目,发现每个新创建的项目都是这样。

采纳答案by taxo

When creating new Android Project, remove the check in front of "Create activity". By doing this, Eclipse will not automatically import the library project "appcompat_v7". Then you manually have to create main activity. Be careful what imports you use if you have stuff like Fragmentor ActionBar.

创建新的Android项目时,去掉“创建活动”前面的勾。通过这样做,Eclipse 不会自动导入库项目“appcompat_v7”。然后您必须手动创建主要活动。如果您有类似FragmentActionBar.

Thisis very useful.

是非常有用的。

Hope this helps! :)

希望这可以帮助!:)

回答by Ishara Amarasekera

When you create your application, give API 14:Android 4.0 or an upper version as the minimum SDK version.

创建应用程序时,请提供 API 14:Android 4.0 或更高版本作为最低 SDK 版本。

回答by svg

the reason why Eclipse does this is because there is a lot of fragmentation in different vendors and versions of android and the same reflects in the API's too..!! So in order keep everything going smooth Android suggests adding external libraries to the project and Eclipse abides to the same.

Eclipse 这样做的原因是因为在不同的供应商和版本的 android 中有很多碎片,同样的反映在 API 中也是如此..!!因此,为了让一切顺利,Android 建议向项目添加外部库,而 Eclipse 也遵循相同的原则。

You can get rid of it if you have built, target and compile level as same, using minimum SDK above 7 shall also do the trick.

如果您的构建、目标和编译级别相同,则可以摆脱它,使用 7 以上的最低 SDK 也可以解决问题。

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

请参阅 为什么 Eclipse 会在我创建新项目时自动添加 appcompat v7 库支持?