Android 警告:App is not indexable by Google Search

此文章发布于 55 个月前,部分信息可能已经过时,请自行斟酌确认。

AndroidManifest.xml文件中,整个<Application>警告:

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

官方文档是这样说的:

To enable Google to crawl your app content and allow users to enter your app from search results, you must add intent filters for the relevant activities in your app manifest. These intent filters allow deep linking to the content in any of your activities. For example, the user might click on a deep link to view a page within a shopping app that describes a product offering that the user is searching for.要使Google能够抓取您的应用内容并允许用户从搜索结果中进入您的应用,您必须为manifest中的相关活动添加intent filters。它们允许深入链接到您的任何活动中的内容。例如,用户可以点击深层链接以查看购物应用中的页面,该页面描述用户正在搜索的产品。

关于 deep link:Create Deep Links to App Content

解决方法

一、按照提示添加 intent-filter

AndroidManifest.xml文件中,至少一个activityintent-filter中添加

<action android:name="android.intent.action.VIEW" />

二、忽略警告

在 app 的build.gradle中添加下列代码:

lintOptions {  
        disable 'GoogleAppIndexingWarning'  
} 

Deeplink 有什么用

举例来说,当用户在其他应用或网页中点击了广告时,使用了Deeplink的商家APP,可以直接跳转到相应商品的界面;而没有使用Deeplink的APP,就只能跳转到首页。包括新闻APP的推送等等。

最后修改:2019 年 10 月 15 日 03 : 21 PM
如果觉得我的文章对你有用,请随意赞赏

发表评论