【问题标题】:android:exported needs to be explicitly specified for <service>android:exported 需要为 <service> 显式指定
【发布时间】:2022-07-13 14:35:24
【问题描述】:

当我将我的 react-native 版本从 0.66.2 升级到 0.68.2 时出现此错误。

错误

清单合并失败:需要明确指定 android:exported 。当相应组件定义了 Intent 过滤器时,面向 Android 12 及更高版本的应用需要为 android:exported 指定显式值。详情请见https://developer.android.com/guide/topics/manifest/activity-element#exported

【问题讨论】:

    标签: android react-native


    【解决方案1】:

    在最新版本的Android中,我们需要为AndroidManifest.xml文件中的所有serviceactivity明确定义android:exported的值。

    例如:

     <service android:exported="false" android:name="serviceName" />
    

    【讨论】:

      猜你喜欢
      • 2022-01-21
      • 1970-01-01
      • 2022-09-29
      • 2021-11-28
      • 2022-08-12
      • 2021-11-10
      • 2022-09-23
      • 2022-01-17
      • 2021-10-03
      相关资源
      最近更新 更多