0

I am trying to add an existing project as a module. However, it wont compile as it says this library is missing:

android-support-v4.jar => com.android.support:support-v4:20.+

I have opened the sdk manager and installed the latest version of Android Support Library but the error remains. How can I fix this please?

RunLoop
  • 20,288
  • 21
  • 96
  • 151

2 Answers2

2

Make sure that you have the "Android Support Repository" installed under "Extras" in the SDK manager.

The support libraries are managed in a local Maven repository, and that repository is the "Android Support Repository" component.

Bryan Herbst
  • 66,602
  • 10
  • 133
  • 120
1

You can manually search the android support library jar in the android sdk directory and then copy it to a directory included in your projects library path. I believe the jar should be somewhere in the \extras\android\support directory.

Note: I must do that when developing android apps with netbeans + android plugin. Not sure if android studio is supposed to pick the support library automatically from the sdk folder.

DanielC
  • 357
  • 1
  • 4
  • 10
  • Hi what do you mean by "a directory in my project's library path"? I found it and added it as a library in libs, but that causes untold gradle errors – RunLoop Oct 16 '15 at 16:22
  • Oh, I meant exactly that: add it as a library in libs. I suppose some extra step is missing. I found the following: http://stackoverflow.com/questions/16608135/android-studio-add-jar-as-library they managed to add a .jar manually, perhaps you can foollow the steps of the first answer. – DanielC Oct 16 '15 at 16:25