Android Eclipse ADT:创建每个新项目后创建项目名称“appcompat_v7”

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/22256746/
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-20 05:43:22  来源:igfitidea点击:

Eclipse ADT: Project name "appcompat_v7" being created after creating every new project

androideclipseadt

提问by uLYsseus

Well I want to highlight this and bring it all in this thread, as the rest of threads did not have a concluded answer, so before skipping into them here are the threads I referred to:

好吧,我想强调这一点并将其全部放在这个线程中,因为其余线程没有得出结论,所以在跳过它们之前,这里是我提到的线程:

Adt doesn't create default hello world but command line does

Adt 不会创建默认的 hello world,但命令行会

[solved ]Eclipse behaving differently while creating new project/activity

[已解决]Eclipse 在创建新项目/活动时表现不同

ADT has been behaving a bit weird since past few days. I keep my SDK always updated so I frequently Run the SDK manager and download all the updates. recently I noticed that if I create a new android app project it is not creating a default MainActivity even if I check that box, it does not create a Activity under src and more to annoy me, I wasnt able to refactor anything, so I realized that I had to update my Eclipse as after reading few posts, but now when I create every new project it creates an annoying appcompat_v7 project with EVERY project, say I create two new projects it creates appcompat_v7_2....this is driving me crazy and the new project library is the appcompat_v7 project. This is becoming annoying and no idea whats going on here !!!! What should I do...please rescue me ! Thanks in advance ....A screenshot to annoy u guys too ... :)

ADT 过去几天表现得有点奇怪。我保持我的 SDK 始终更新,所以我经常运行 SDK 管理器并下载所有更新。最近我注意到,如果我创建一个新的 android 应用程序项目,它不会创建默认的 MainActivity,即使我选中了那个框,它也不会在 src 下创建一个 Activity,更让我烦恼的是,我无法重构任何东西,所以我意识到在阅读了几篇文章后,我不得不更新我的 Eclipse,但是现在当我创建每个新项目时,它会在每个项目中创建一个烦人的 appcompat_v7 项目,比如说我创建了两个新项目,它创建了 appcompat_v7_2 ......这让我发疯了新的项目库是 appcompat_v7 项目。这变得很烦人,不知道这里发生了什么!!!!我该怎么办……求你救救我!提前致谢....截图也惹恼你们... :)

Today is not my day!

Today is not my day!

***************Current Alternative, not a solution***********************

***************当前的替代方案,不是解决方案***********************

As of 12/5/2014 with ADT 23.0.2 I dont see this issue anymore.

截至 2014 年 5 月 12 日,使用 ADT 23.0.2 时,我不再看到此问题。

I have waited for an acceptable solution on this issue (as of now there is none), but one of the SO members directed me to this post https://code.google.com/p/android/issues/detail?id=66975. What I am doing is described in one of the solutions below, but for people who have come to this post, the alternative is to delete that ugly project(if you have more than one) which has been created and add up this one(appcompat_v7) as a library. So if you create another project and appcomat_v7_2...comes up delete that and point your project to the appcompat_v7, do the same for other projects too. This is not recommended for some reason though, but it worked well for me till now without issues. If anyone hits up with a solution please post it here. ****************Current Alternative, not a solution*****************************

我一直在等待关于这个问题的可接受的解决方案(截至目前还没有),但其中一位 SO 成员将我指向这篇文章https://code.google.com/p/android/issues/detail?id= 66975. 我正在做的事情在下面的解决方案之一中进行了描述,但是对于来到这篇文章的人来说,另一种选择是删除已创建的丑陋项目(如果您有多个)并将此项目相加(appcompat_v7 ) 作为图书馆。因此,如果您创建另一个项目并且 appcomat_v7_2...出现删除该项目并将您的项目指向 appcompat_v7,请对其他项目执行相同操作。虽然出于某种原因不建议这样做,但到目前为止它对我来说效果很好,没有问题。如果有人找到解决方案,请在此处发布。****************当前的替代方案,不是解决方案**************************** *

回答by Murad

the folder appcompat_v7 doesnt get created if i use

如果我使用,则不会创建文件夹 appcompat_v7

minSdkVersion="14"

回答by shap4th

Seems like it is a eclipse bug. What you need to do is go to properties in the of the Android Project and in the Android Section. Add the library appcompat_v7 and remove the appcompat_v_7_2 (duplicate). Then you can remove the appcompat_v7_2 as a eclipse project. All errors fixed.

似乎这是一个日食错误。您需要做的是转到 Android 项目和 Android 部分中的属性。添加库 appcompat_v7 并删除 appcompat_v_7_2(重复)。然后你可以将 appcompat_v7_2 作为 eclipse 项目删除。修复了所有错误。

Just a workaround.

只是一种解决方法。

回答by GPrimola

The appcompat project is a library to support android's older versions. The support library was introduced by Google recently - I don′t know in which Android version. But the point is, this project is only created when you create an Android project to cross Android platforms. I mean, when you select an old min API, e.g. API 8 (Froyo), but target recently versions, your project must have the support library. Anyway, the creation of appcompat_v7 project is some issue that has to be better configured by the eclipse plugin maintainers. However you can elegantly turn over this issue by targeting newer APIs and including in the build path the support library. This is more elegant than the others because it is better to you focus in only one android version when building your application, and when it is done, you have an authentic version of your app that you can use as a mold to support other versions, either older or newers.

appcompat 项目是一个支持 android 旧版本的库。支持库是谷歌最近推出的——不知道是哪个Android版本。但重点是,这个项目只有在你创建一个跨Android平台的Android项目时才会创建。我的意思是,当您选择旧的 min API,例如 API 8 (Froyo),但目标是最近的版本时,您的项目必须具有支持库。无论如何,appcompat_v7 项目的创建是一些必须由 eclipse 插件维护者更好地配置的问题。但是,您可以通过定位较新的 API 并在构建路径中包含支持库来优雅地解决这个问题。这比其他的更优雅,因为在构建应用程序时最好只关注一个 android 版本,当它完成时,