Reputation: 157
I'm using the Android SDK as a standalone version (since I don't like IDEs very much).
However, now I wanted to use the Support Libraries and downloaded them with the ./android tool. And I checked that the /extras/android/support/v4/android-support-v4.jar exists.
Yet, my compiler doesn't seem to recoginize them (error: package android.support does not exist). I believe that I have to get them in my classpath somehow, but have no idea how this should work (on the android page it is only explained for IDEs).
Any suggestions?
Upvotes: 3
Views: 1974
Reputation: 16833
I needed to specifically get the support libraries (a jar file) to be included in a legacy ant-based Android build, and I wasn't able to get the command line suggested by the links from CommonsWare to work (specifically, the suggestions from https://developer.android.com/tools/projects/projects-cmdline.html#ReferencingLibraryProject required that I actually have a full project to reference.)
As it turns out, all I had to do was put the support library jar (eg: android-support-v4.jar) in the project's lib
directory and everything worked. That may be specific to the ant build I'm using, but I think it's the same build file that the google tools used to generate.
Upvotes: 0
Reputation: 1007474
While the Android Support library documentation focuses on the two main IDEs, the documentation on command-line projects has instructions on how to reference an Android library project.
Upvotes: 3