代码之家  ›  专栏  ›  技术社区  ›  Moiz Travadi

错误:瞄准S+(版本31及以上)要求在存在意向过滤器时定义android:exported的显式值

  •  0
  • Moiz Travadi  · 技术社区  · 2 年前

    我有一个旧的android应用程序项目,现在我想从30开始瞄准compileSdkVersion 33。我已经做了更改,并且在AndroidManifest文件中添加了android:exported in activity,但在尝试运行时仍然会出现此错误。应用程序构建没有错误,但每当我尝试运行时,都会出现此错误。

    Installation did not succeed.
    The application could not be installed: INSTALL_PARSE_FAILED_MANIFEST_MALFORMED
    
    List of apks:
    [0] 'D:\16032022\Dwarkesh\dwarkesh_estate_android\app\build\outputs\apk\debug\app-debug.apk'
    Installation failed due to: 'INSTALL_PARSE_FAILED_MANIFEST_MALFORMED: Failed parse during installPackageLI: /data/app/vmdl1166334359.tmp/base.apk (at Binary XML file line #190): leakcanary.internal.activity.LeakLauncherActivity: Targeting S+ (version 31 and above) requires that an explicit value for android:exported be defined when intent filters are present'
    Retry
    Failed to launch an application on all devices
    

    我附上了我的AndroidManifest文件的屏幕截图,其中显示了0个错误。

    enter image description here

    这很紧急。请帮帮我。

    1 回复  |  直到 2 年前
        1
  •  1
  •   ΓDΛ    2 年前

    更新的LeakCanary版本

    debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.12'