java - 我有警告“Google 搜索无法索引应用程序;请考虑添加至少一个带有 ACTION-VIEW 意图过滤器的 Activity。”
问题描述
更新后,工作室出现如下警告:“App is not indexable by Google Search; 考虑添加 ACTION-VIEW 意图过滤器。有关更多详细信息,请参阅问题说明。更多... (Ctrl + F1) » 如何解决?
我的 Api 是 28 岁。
这是我的清单:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.omen.serverforcofe" >
<uses-permission android:name="android.permission.NFC"/>
<uses-feature android:name="android.hardware.nfc" android:required="true" />
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme"
>
<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:launchMode="singleTop">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<intent-filter>
<action android:name="android.nfc.action.NDEF_DISCOVERED" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="text/plain"
/>
</intent-filter>
</activity>
</application>
</manifest>
解决方案
<activity
android:name=".MyActivity"
android:screenOrientation="portrait"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
</intent-filter>
</activity>
将此意图过滤器添加到应用程序清单中声明的活动之一为我解决了这个问题。
推荐阅读
- java - java将runnable转换为callable
- c++ - 在 OpenCV 中使用 C++ 为 TriangulatePoints 将关键点转换为 cv::Mat
- c# - POST 请求的最佳实践
- c# - 有没有办法从同时输入的多个列表中删除一个项目?
- vb.net - For 循环 继续 For
- c# - 我应该如何使用 C# 8.0 中的可为空选项处理有关泛型的问题?
- reactjs - 如何在反应中将firestore中的整个集合设置为数组?
- python - Anaconda 显示此错误,无法正确训练模型
- gdb - Cygwin GDB 无法启动
- git - Git 在变基时显示旧已解决提交的合并冲突