求助App is not indexable by Google Search; consider adding at least one Activity with an ACTION-VIEW

 

AS升级后,发现原来的代码会生成报出一个: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中增加如下代码:


    
        
        
        
        
        
        
        
    

第二种方法是在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

你可能感兴趣的:(求助App is not indexable by Google Search; consider adding at least one Activity with an ACTION-VIEW)