22

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

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

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 ... :)

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.

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*****************************

Community
  • 1
  • 1
uLYsseus
  • 995
  • 6
  • 16
  • 37
  • 1
    It has to be something with a recent update. I updated mine on Friday and it has been a headache ever since. Not only does it do this, but it won't let me drop the duplicated \libs\android-support-v4.jar library (now that it is contained in appcompat-v7\libs) so every time I create an application I have to manually delete the older support-v4. I hope someone figures this out. – zgc7009 Mar 10 '14 at 16:00
  • 1
    I think it was part of the ADT 22.6.0 revision. According to: http://developer.android.com/tools/sdk/eclipse-adt.html the revisions included: "Updated the New Project templates to include the v7 appcompat Support Library." The accepted answer here: http://stackoverflow.com/questions/22261288/why-my-eclipse-automatically-adds-appcompat-v7-library-support-whenever-i-create gives some general reasons that it's good to include the support library. – gcbound Mar 10 '14 at 23:04
  • 3
    Check this out http://stackoverflow.com/questions/22261288/why-eclipse-automatically-adds-appcompat-v7-library-support-whenever-i-create-a – Talha Q Mar 12 '14 at 13:07
  • 2
    +1 for all the above three comments, but what if my minsdk is 11+, even then its creating that. Its becoming annoying as it creates one for each individual project, I have to manually delete and point every project towards one appcompat_v7 as of now. I am looking for a way of something like using a jar file or something...should try that out... – uLYsseus Mar 12 '14 at 18:41

3 Answers3

12

the folder appcompat_v7 doesnt get created if i use

minSdkVersion="14"
Avinash Raj
  • 172,303
  • 28
  • 230
  • 274
Murad
  • 383
  • 1
  • 7
4

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.

Just a workaround.

shap4th
  • 129
  • 1
  • 4
  • Thats what i was doing before posting this one ...but its not the solution im looking for bro...any other ideas ? – uLYsseus Mar 23 '14 at 07:08
  • 1
    I dont, but follow this, [ https://code.google.com/p/android/issues/detail?id=66975 ] – shap4th Mar 23 '14 at 09:53
0

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.

GPrimola
  • 1,685
  • 1
  • 12
  • 8