5

I just downloaded Eclipse 4.4 Luna and installed the latest ADT 20 on it. Now, new templates for new Android Project are included. One of them is "Android TV Activity".

The existing code uses Android Support Library v17!!

import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import android.support.v17.leanback.widget.ImageCardView;
import android.support.v17.leanback.widget.Presenter;
import android.util.Log;
import android.view.View;
import android.view.ViewGroup;

But I cannot find the new support library v17 anywhere! I've searched d.android.com, and still cannot find it. Where can I find it?

Eng.Fouad
  • 115,165
  • 71
  • 313
  • 417

3 Answers3

3

The Leanback library is available in the Support Repository. If you're using Gradle you can get it using:

compile "com.android.support:leanback-v17:+"

You can install the Support Repository package via the SDK manager, and you can see where Gradle pulls the dependency from at <sdk root>/extras/android/m2repository/com/android/support/leanback-v17/21.0.0-rc1. However, I haven't used Eclipse for Android development for ages so I'm unaware if it even supports AAR libraries.

Eddie
  • 1,968
  • 17
  • 19
  • 5
    "I'm unaware if it even supports AAR libraries" -- it doesn't. And AFAIK we can't readily back-convert an AAR into a regular library project. Hopefully they will ship a regular library project as well at some point. – CommonsWare Jun 26 '14 at 21:11
  • 1
    .aar files are some zip files. You can rename them, uncompress them and then move the sources in a new project. I know it's not a clear way... but it's still a way :) – Spotlight Jun 26 '14 at 22:35
  • 1
    FWIW, while Eclipse/ADT does not support AARs presently, [Maven for Android does](https://code.google.com/p/maven-android-plugin/wiki/AAR), and there is a recipe floating around for [converting AARs into ordinary Android library projects](http://commonsware.com/blog/2014/07/03/consuming-aars-eclipse.html). I have not yet tried that recipe with `leanback-v17`, so YMMV. – CommonsWare Jul 04 '14 at 11:36
0

If you are using Eclipse ADT, you can get the leanback support libraries as APKLibs from the following project.

https://github.com/kingargyle/adt-leanback-support

It takes the source from the leanback libraries and dependencies and makes APKLibs and jars that Eclipse can then use.

kingargyle
  • 1,239
  • 10
  • 15
0
implementation "com.android.support:leanback-v17:24.0.0"

Your version code 24.0.0 depends on your Android sdk, the latest version is 28.0.0.

You can see all the versions in here.

Elikill58
  • 4,050
  • 24
  • 23
  • 45
askxionghu
  • 151
  • 1
  • 4