新創建的項目AndroidManifast報App is not indexable by Google Search;

原錯誤提示: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.

Google翻譯:在SDK版本23及更高版本上,您的應用數據將在應用安裝時自動備份和恢復。 考慮添加屬性`android:fullBackupContent`來指定`@ xml`資源,該資源配置要備份的文件。

更多信息:https://developer.android.com/training/backup/autosyncapi.html

官方解釋:

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(牆):https://developer.android.com/training/app-links/deep-linking

解決方法

一、按照提示添加intent-filter

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

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

 

二、忽略警告

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

lintOptions {
        disable 'GoogleAppIndexingWarning'
    }

 

Deeplink有什麼用

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

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