新建安卓專案後,manifest.xml中會出現大段的黃色警告
阿新 • • 發佈:2020-11-17
解決辦法,在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>