在AndroidManifest.xml中使用receiver时,warning “Exported receiver does not require permission”,
解决方案:
1 :可以在警告的recevier 里面加入 tools:ignore="ExportedReceiver"
2 :定义xml的命名空间 xmlns:tools="http://schemas.android.com/tools"
参考:
<manifest xmlns:android="
http://schemas.android.com/apk/res/android"
package="com.example.jpushdemo"
xmlns:tools="http://schemas.android.com/tools"
android:versionCode="140"
android:versionName="1.4.0"
>
<receiver tools:ignore="ExportedReceiver"
android:name=".MyReceiver" >
<intent-filter>
转载https://www.jpush.cn/qa/?qa=974/exported-receiver-does-not-require-permission