AndroidManifest警告App is not indexable by Google Search...

在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。它們允許深入鏈接到您的任何活動中的內容。例如,用戶可以點擊深層鏈接以查看購物應用中的頁面,該頁面描述用戶正在搜索的產品。

意思就是說,你要是在別的地方投了廣告,想讓用戶點擊之後,直接跳轉到你的商品詳情頁什麼的,需要在activity的節點下面添加一個過濾器,用戶可以直達這個頁面.

舉例來說,當用戶在其他應用或網頁中點擊了廣告時,使用了Deeplink的商家APP,可以直接跳轉到相應商品的界面;而沒有使用Deeplink的APP,就只能跳轉到首頁。包括新聞APP的推送等等。

解決方法

一、按照提示添加intent-filter(deep-link)

在至少一個activity的intent-filter中添加

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

二、忽略警告

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

lintOptions {  
        disable 'GoogleAppIndexingWarning'  
} 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章