[英]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.