Android Support Library v17

旧街凉风 提交于 2019-12-21 13:48:34

问题


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?


回答1:


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.




回答2:


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.



来源:https://stackoverflow.com/questions/24439671/android-support-library-v17

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!