Android 5. App is not indexable by Google Search; consider adding at least one Activity with an ...

App is not indexable by Google Search; consider adding at least one Activity with an ACTION-VIEW的warning。

From official documentation :

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.

解决的办法是两个:

1,根据上面的提示,增加一个deeplink,在activity中增加如下代码:

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

第二种方法是在app的bulid.gradle 文件中增加下面几行代码来关闭检索的功能。

defaultConfig {

}

lintOptions {

    disable 'GoogleAppIndexingWarning'

    baseline file("lint-baseline.xml")

}

}

 https://stackoverflow.com/questions/34173545/missing-support-for-firebase-app-indexing-android-lint

————————————————

作者连接:https://blog.csdn.net/u013323018/article/details/82835241

原文链接:https://blog.csdn.net/u013323018/article/details/82835241

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容