Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create n project with ADT r20 without including the android support library?

I have recently update my ADT to rev. 20, but now I find that newly created project always included the android support library. I don't want to use the FragmentActivity class, which is defined in the support library, I just want to use the pure Fragment class.

I tried to delete the support library via the SDK manager tool, but now I cannot create any projects since the ADT is reporting

This template depends on the Android Support library, which is either not installed, ......

Is there any method to by pass this except for create a project by shell command?

like image 962
Robin Avatar asked Jul 11 '12 04:07

Robin


2 Answers

Go the SDK_Folder/extra/android and rename the folder compatibility to support. After that, restart the Eclipse.

like image 137
Midson Avatar answered Oct 17 '22 02:10

Midson


Well, it's not ideal but until they fix ADT there at least appears to be a manual way to get there.

  1. Create the Android project with a min SDK of ICS. Skip adding an Activity when the wizard prompts to add one. Yes, annoyingly, it still adds the Support Library.

  2. After the project is created, open the project properties and go to Java Build Path.

  3. On the Libraries tab select Android Dependencies, click the Remove button, and click OK.

  4. In package explorer expand the "libs" folder and delete the support library jar.

I believe this gets you an ICS project without the unnecessary support library.

like image 36
Robert Nekic Avatar answered Oct 17 '22 02:10

Robert Nekic