Instant App,实际的最低sdk是多少 [英] Instant App, What's the actual minimum sdk

查看:95
本文介绍了Instant App,实际的最低sdk是多少的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

根据android开发者网站,Instant应用的最低sdk为21,即5.0.

解决方案

该要求仅存在于设置向导中,这是一个错误.如果在创建项目后将值更改为更低的值,则会看到它可以正常运行并且可以在API 21和22设备上运行.

该文档关于受支持的Android版本是正确的,但请注意,即使这样也没有规定任何特定的minSdkVersion.您可以构建一个minSdkVersion低于21的即时应用程序.由于Instant Apps Runtime本身限制为21+,因此它不会在21之前的任何版本上运行.

由于这个原因,即使我们在23之前不支持设备,此检查也始终是一个错误,尽管没有验证,但我还是被告知该问题已在3.0中修复.我今晚检查了一下,并确认该检查在3.0中仍然存在.可以在更新的版本中修复.但是,如果没有,我们需要解决该问题.我会跟进.

As per the android developers site, minimum sdk for Instant app is 21, ie 5.0. link

The site clearly states : Android Instant Apps are available on the majority of devices running Android 5.0 (API level 21) and higher.

But when we create a new project as per the guideline given in this link which states that we need to have minimum sdk of 23, to get instant app support.

And does not allow me to create a support for 5.0.

as shown in below image which I tried :

解决方案

That requirement exists only in the setup wizard, and it is a bug. If you change the value to something lower after creating the project, you'll see that it builds fine and can run on API 21 and 22 devices.

The documentation is correct about supported Android versions, but note that even that doesn't dictate any particular minSdkVersion. You can build an instant app with a minSdkVersion lower than 21. It just won't run on anything before 21, since the Instant Apps Runtime itself is restricted to 21+.

For that reason, this check was always a bug, even when we didn't support devices before 23. I was told it was fixed in 3.0, though I didn't verify. I checked tonight and confirmed that the check is still present in 3.0. Could be fixed in a more recent version. But if not, we need to fix that. I'll follow up.

这篇关于Instant App,实际的最低sdk是多少的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆