1

I'm trying to import a project into Eclipse and I'm getting the errors:

The import android.support.v7.widget.Toolbar cannot be resolved The project was not built since its build path is incomplete. Cannot find the class file for android.support.v4.app.ActionBarDrawerToggle$DelegateProvider

I found this answer from other question -Why the import android.support.v7.widget.Toolbar cannot be resolved in my project So it seems to be a problem with the Android Support Library. But when I try to update mine it only has version 20 available. The other answer said they were able to upgrade their version but I don't seem to have that option. How to do get the latest version of the Support Library?

enter image description here

user123456789
  • 1,914
  • 7
  • 44
  • 100
  • Have you checked if the class is found in any of the libraries in `android-sdk\extras\android\m2repository\com\android\support` ? You may have to create your own Eclipse library project from one of the .aar files there. That said, there are very few reasons not to switch to Android Studio and gradle, and sticking with Eclipse will likely prove to be a painful experience. – Michael Jan 23 '18 at 10:07
  • @Michael I don't have a m2repository folder just a support folder in sdk\extras\android\ – user123456789 Jan 23 '18 at 10:16
  • You might have to download the Android Support Repository package to get those folders. – Michael Jan 23 '18 at 10:17
  • @Michael Ok I've downloaded the Android Support Repository. Is there something I need to do to add these to my project? – user123456789 Jan 23 '18 at 10:26
  • First you need to find which library contains the classes you need. Then you need to include that library in your project somehow. I'm pretty sure there are guides for how to use those .aar files with Eclipse if you search, because I've done that a long time ago. – Michael Jan 23 '18 at 10:30
  • 1
    It will be more and more difficult for you to find answers to eclipse-specific questions for a simple reason: there are less and less people who use it. I'd say that almost nobody is using it. Just migrate to Android Studio. You know that you will have to do that soon or later. – Vladyslav Matviienko Jan 23 '18 at 12:06

1 Answers1

1

How to do get the latest version of the Support Library?

As you can check in official documentation:

Important: The support libraries are now available through Google's Maven repository. You do not need to download the support repository from the SDK Manager.

It means that SDK Manager and the sdk\extras\android folder will not contain the latest support libraries.

Just migrate to Android Studio.

Gabriele Mariotti
  • 320,139
  • 94
  • 887
  • 841
  • To elaborate a bit, Eclipse is no longer officially supported as an Android development platform. So it's likely more and more things will break, and Google is not going to fix them. – nasch Jan 25 '18 at 15:09