在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
文件中,至少一个activity
的intent-filter
中添加
<action android:name="android.intent.action.VIEW" />
二、忽略警告
在app
的build.gradle
中添加下列代码:
lintOptions {
disable 'GoogleAppIndexingWarning'
}
Deeplink有什么用
举例来说,当用户在其他应用或网页中点击了广告时,使用了Deeplink的商家APP,可以直接跳转到相应商品的界面;而没有使用Deeplink的APP,就只能跳转到首页。包括新闻APP的推送等等。