简体   繁体   English

我如何支持API 16但仍然有Leanback?

[英]How can I support API 16 but still have Leanback?

I made my game work on Android TV, it required Leanback library , which wants minSdkVersion to be 17. I must support API 16 too. 我让我的游戏在Android TV上工作,它需要Leanback library ,它希望minSdkVersion为17.我也必须支持API 16。 What can I do? 我能做什么?

When building, I get an error this suggestion: 建设时,我得到一个错误这个建议:

Suggestion: use tools:overrideLibrary="android.support.v17.leanback" to force usage

What exactly does it do? 它到底是做什么用的? Does it actually make my app still support API 16? 它真的让我的应用程序仍然支持API 16吗? What am I losing? 我失去了什么?

You can find the detailed information here . 您可以在此处找到详细信息。

Here is what it says: 这是它说的:

tools:overrideLibrary marker 工具:overrideLibrary标记

A special marker that can only be used with uses-sdk declaration to override importing a library which minimum SDK version is more recent than that application's minimum SDK version. 一个特殊的标记,只能与uses-sdk声明一起使用,以覆盖导入库,该库的最低SDK版本比该应用程序的最低SDK版本更新。 Without such a marker, the manifest merger will fail. 没有这样的标记,清单合并将失败。 The marker will allow users to select which libraries can be imported ignoring the minimum SDK version . 该标记将允许用户选择可以导入哪些库而忽略最低SDK版本

And you need to do the following: In the main android manifest : 你需要做以下事情:在主要的Android清单中:

<uses-sdk android:targetSdkVersion="14" android:minSdkVersion="2"
          tools:overrideLibrary="android.support.v17.leanback"/>

Hope this helps. 希望这可以帮助。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何更改 Android Leanback 库以支持背景视频而不是背景图像 - How can I change Android Leanback library to support a background video instead of background image Leanback库支持API级别19 Android for TV app? - Leanback library support for API level 19 Android for TV app? 如何使用旧的 api(如 16)构建 android 应用程序? - How can I build an android application with an old api (as 16)? 如何将设计支持库与 leanback 一起用于 android TV? - How to use design support library together with leanback for android TV? 如何使用 VideoSupportFragment 在 TV 倾斜应用程序中捕获触摸事件以显示视频控件? - How can I catch touch events in a TV leanback app to show video controls using VideoSupportFragment? 我怎样才能让 EditText 带有可点击的 Spannables 并且仍然可以通过 longClick 选择? - How can i have EditText with Clickable Spannables and still selectable by longClick? “ v17 leanback库”(android电视支持库)可以支持2.x或4.x设备吗? - Can “v17 leanback library”(android tv support library) support 2.x or 4.x device? 我已将我的 Google API 密钥限制为我的移动应用程序 package。 还能被盗吗? - I have restricted my Google API key to my mobile app package. Can it still be stolen? 如何在android中实现Dropbox?我已经成功实现了API,但仍然无法正常工作 - How to Implement Dropbox in android ?I have implemented the API successfully but it still not working 支持大于API 16的库? - support libraries for greater than API 16?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM