简体   繁体   中英

Android Support Library v17

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?

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.

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.

implementation "com.android.support:leanback-v17:24.0.0"

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

you can see all the versions in: https://mvnrepository.com/artifact/com.android.support/leanback-v17

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM