美文网首页android适配Android开发
AndroidManifast警告App is not inde

AndroidManifast警告App is not inde

作者: Rimson | 来源:发表于2018-11-03 16:21 被阅读6411次

    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" />

    二、忽略警告

    appbuild.gradle中添加下列代码:

    lintOptions {  
            disable 'GoogleAppIndexingWarning'  
    } 
    

    Deeplink有什么用

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

    相关文章

      网友评论

        本文标题:AndroidManifast警告App is not inde

        本文链接:https://www.haomeiwen.com/subject/ivwkxqtx.html