新建安卓项目后,manifest.xml中会出现大段的黄色警告

解决办法,在activity中加

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

修改后如下:

    <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=".view.B02DynamicReceiver"/>
        <activity android:name=".view.B01MyBroadcast" />
        <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>
        <receiver
            android:name=".receiver.B01Receiver"
            android:enabled="true"
            android:exported="true">
            <intent-filter>
                <action android:name="com.zhenhunfan.broadcast.demo.view.B01MyBroadcast.MYBROADCAST" />
            </intent-filter>
        </receiver>
        <receiver
            android:name=".receiver.B03SmsReceiver"
            android:enabled="true"
            android:exported="true">
            <intent-filter>
                <action android:name="android.provider.Telephony.SMS_RECEIVED" />
            </intent-filter>
        </receiver>
    </application>
posted @ 2020-11-17 16:56  镇魂帆-张  阅读(243)  评论(0编辑  收藏  举报