gpt4 book ai didi

android-studio - 缺少对 Firebase 应用索引的支持 (android lint)

转载 作者:行者123 更新时间:2023-12-03 04:23:03 24 4
gpt4 key购买 nike

我在 Android studio 上分析代码(分析 > 检查代码)时收到此 lint 警告。

App is not indexable by Google Search; consider adding at least one Activity with an ACTION-VIEW intent-filler. See issue explanation for more details.

此警告是什么?如何使我的应用可被 Google 搜索索引?这听起来对 SEO 很重要,但我在 Google 上找不到任何详细信息。

我还想知道如何从 android studio 访问“问题解释”。

enter image description here

编辑:

“应用程序无法被 Google 搜索索引”是旧的警告。新的警告是“缺少对 Firebase 应用索引的支持”

最佳答案

我找到了如何访问“问题说明”。我需要将鼠标悬停在检查错误上以显示完整的内联问题解释(并按 Ctrl-F1)

enter image description here

所以我缺少的关键字是“深层链接”!

以下是做深层链接的android开发者页面“让Google能够抓取您的应用内容并允许用户从搜索结果进入您的应用”

http://developer.android.com/training/app-indexing/deep-linking.html

以下是有关如何进行深层链接的代码片段。我不知道 Google 如何通过添加它来抓取我的应用程序...

<activity
android:name="com.example.android.GizmosActivity"
android:label="@string/title_gizmos" >
<intent-filter android:label="@string/filter_title_viewgizmos">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<!-- Accepts URIs that begin with "http://www.example.com/gizmos” -->
<data android:scheme="http"
android:host="www.example.com"
android:pathPrefix="/gizmos" />
<!-- note that the leading "/" is required for pathPrefix-->
<!-- Accepts URIs that begin with "example://gizmos”
<data android:scheme="example"
android:host="gizmos" />
-->
</intent-filter>
</activity>

还有一个注释,上面写着

Note: Intent filters may only contain a single data element for a URI pattern. 
Create separate intent filters to capture additional URI patterns.

关于android-studio - 缺少对 Firebase 应用索引的支持 (android lint),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34173545/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com