当前位置:   article > 正文

Android Studio配置Intent-filter编译报错_manifest merger failed : android:exported needs to

manifest merger failed : android:exported needs to be explicitly specified f

报错内容如下:

Manifest merger failed : android:exported needs to be explicitly specified for <activity>. Apps targeting Android 12 and higher are required to specify an explicit value for `android:exported` when the corresponding component has an intent filter defined.

大概意思是targeting大于等于Android 12时,如果有的Activity配置了Intent-filter,必须同时配置exported属性。

根据报错,有两种解决方案:

1、将build.gradle的targetSdk改成30以下

2、或者在AndroidManifest.xml的含有<Intent-filter>标签里添加export属性并赋值为true

最后锤子一下

问题不大! 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/盐析白兔/article/detail/824108
推荐阅读
相关标签
  

闽ICP备14008679号