低版本app安装在高版本系统中提示:The application could not be installed: INSTALL_PARSE_FAILED_MANIFEST_MALFORMED

有个基于Android6.0的app项目,现在需要在Android13系统上面运行,结果安装的时候提示:The application could not be installed: INSTALL_PARSE_FAILED_MANIFEST_MALFORMED。 

打开Event log里面还有一个提示:Failed to commit install session 807877484 with command cmd package install-commit 807877484. Error: INSTALL_PARSE_FAILED_MANIFEST_MALFORMED: Failed parse during installPackageLI: /data/app/vmdl807877484.tmp/base.apk (at Binary XML file line #34): com.youngfeel.yfclock.yfclockbootreceiver: Targeting S+ (version 31 and above) requires that an explicit value for android:exported be defined when intent filters are present

大概意思是说app在Android13(version 31)系统中运行,AndroidManifest.xml需要添加android:exported,由于现在是基于Android6.0的app,android:exported是Android13才要求的,于是在application节点下面的activity节点和receiver节点中都添加一个android:exported=“true”,再重新编译运行就可以了。

你可能感兴趣的:(android:app,android,studio,app)