Android sdk manager I don't have Android Support Library - android

I do a Android training and I have to use Eclipse. I created a new project and I get the error
android.support cannot resolved.
I look for the android-support-*.jar.
This is my SDK manager
I don't have Android Support Library package in my SDK Manager. How can I install the package "Android Support Library" ?

You have already downloaded Android support Repository .
To add support library to project, go to android sdk location sdk\extras\android\support , you can find all support libraries there .Add what ever library you need as a dependency
i guess you have to add V7 appCompact

If you are using linux. Try doing this in the terminal, it worked for me at some point in time. Don't know if it still works:
:~$ android list sdk -a --extended|less
This will list all the packages plus the extra-androidm2-repository because of the --extended option. After this you can the type:
android update sdk --no-ui -a --filter "extra-android-m2repository"
This will proceed to download the extra support repository, and place it in the $ANDROID_HOME/extras/android/m2repository/.If that does not work try downloading the zip file here. This is still not the end of it because you still have to find a way to use it and
This is why you should move to Android studio
The structure of android support repository changed to the .aar format. This means you cannot import the library as you would have with earlier support versions. You have to use maven plugin in eclipse to manage the libraries.
Maven central does not have the latest android support libraries, hence you have to use maven android connector.
If you want to read more, on how to Mavenize your project and use maven for android libraries read this. I found it personally to be very hard compared to android studio where you just have to add a dependency in gradle. Good luck.

Related

How add Android Support Repository Rev. 36 to Eclipse version Neon release 4.6.0?

Recently I've removed my old Eclipse and download/install new version Neon.
I know I have to download SDK from Android SDK Manager. So I've download some releases which I needed and for "Extra" part could find Android Support Library.
I've checked Obsolete and found it, but I want to use new version of appcompat (24.2.0) which is part of Android Support Repository and I've downloaded, but can not add it by normal way (I think).
So how to add appcompat 24.2.0 into Eclipse?
Note:
When I want to import Existing Android code Into Workplace and address it to the appcompat there isn't anything to add, because it's Maven:
C:\android-sdk-windows\extras\Android\m2repository\com\Android\support\appcompat-v7\24.2.0

Android Studio-Failed to resolve:com.android.support:appcompat-v7.22.2.0

I imported project from Github and there's error:
I have already update SDK manager with Android Support Respository and Android Support Library:
I have already update SDK manager with Android Support Respository and Android Support Library
If you look at that picture, you will notice that you are on version 14 of the Android Support Repository. Please update the Android Support Repository to the latest version. That should allow you to add 22.2.0 of appcompat-v7.
Fix simple. Click link Install Repository and sync project and continue install.
Not click Show In file
Not click Show In project structure dialog
This diferent links.

How to force Eclipse project to use an older version of the support library

I know I know I should be using Android Studio, but I can't for some reasons.
So is there a way to force Eclipse to use an older version of the support library for a project.
For example in Android Studio, we can do that by the 22.2.1 part in the build.gradle file:
compile 'com.android.support:appcompat-v7:22.2.1'
The only option is to find the old version of appcompat-v7, add it (including the sources or jars and all resources) as a library project into your Eclipse workspace and then make your project use/import that library.
Download specific compatibility lib from dl-ssl.google.com repository, described in here: Android Support Library Direct Link for Downloading
Specifically guess/construct your version here:
https://dl-ssl.google.com/android/repository/support_r19.1.zip
Unzip and import as existing source into eclipse.
Check to install according Android SDK Build-tools in the Android ASK manager.

How can I tell which Android Support Library v4 revision I use?

I can see in the Android SDK manager the version installed on my computer (in Android SDK manager), but usually a project uses its own copy from the libs folder.
Is there a way I can tell which version is the android-support-v4.jar being used in a specific project besides the file date?
Any method is considerable - by code / eclipse / file manager
in eclipse package explorer right click in your project
select android tools -> Add supported Library
there you see which supprt library revision id you have, in my case is 11
Take the md5 hash of the jar in your app's libs directory.
Compare it to the hashes of support library jar files to work out exactly which one you're using.
e.g. to generate hashes you could use: http://nule.org/wp/?page_id=86
run this from a batch file with:
java -jar JMd5Sum.jar
when you are selecting android Tools -> Add support Library option .it has automatically added compatible v4 library .android os is telling which one is compatible with your project.
If you wants to add particular version of any jar .firstly you have downloaded and put manully in libs folder then it added as external jar.
Build a SHA1 hash of the support library v4 jar file and compare the result with the listed hashes here: http://www.smartphoner.org/2014/11/23/android-support-library-v4-revisionen-und-hashes/
Nower days the actual support library revision is equal to the api level of the newest android version. Currently this is 21 (Lollipop).
Android SDK can show the version of Android support Repository, and make sure you download Android Support Repository by using Android SDK Manager.
If you really want to add an old support lib, you can check the version under Android studio. Right click your project, select "Open Module Settings" -> then select your app modules -> "Dependencies" . You can check your support lib version.

Keeping updated with the Android Support Library revisions

Eclipse provides a single click and download for the support library for an android project, and it adds it to the libs/ folder as "android-support-v4.jar"
The above jar has no reference to revision number (currently r10), so surely (unless I use maven) how are other people keeping up to date with the support library revisions?
I agree with #yorkw, the SDK manager tells you which version is currently installed. Also, using the android tools -> add support library will in-fact install a newer version if available, you will see that later in the SDK manager.
If what you are asking is how you know a new version is available so you can update? than the answer is definitely SDK manager, as yorkw said.

Categories

Resources