Android Stuudioでプロジェクトを新規作成すると、Android Manifestで警告が毎回出ています。
今回はその解決策を備忘録として残しておきます。
同じように解決策を探されている方はご参考下さい。
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.」
Android Manifestの中身は以下です。
<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="mana.guu.android11_sample"> <application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_round" android:supportsRtl="true" android:theme="@style/AppTheme"> <activity android:name=".MainActivity"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> </manifest>
これを以下1行追加することで、解消されます。
<?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="mana.guu.android11_sample"> <application android:allowBackup="true" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" android:roundIcon="@mipmap/ic_launcher_round" android:supportsRtl="true" android:theme="@style/AppTheme"> <activity android:name=".MainActivity"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.VIEW" /> (★ここを追加★) <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> </application> </manifest>
この警告文は無視していての特に問題はありませんが、毎プロジェクトで出ているので対策したいという方は、上記の様にすることが解消されますので、ご検討下さい。