05/23 16:24:51: Launching 'app' on realme.
Installation did not succeed.
The application could not be installed: INSTALL_PARSE_FAILED_MANIFEST_MALFORMED
List of apks:
[0] 'E:\New folder\MyPlayer\android\app\build\outputs\apk\debug\app-debug.apk'
Installation failed due to: 'Failed to commit install session 1629738225 with command package install-commit 1629738225. Error: INSTALL_PARSE_FAILED_MANIFEST_MALFORMED: Failed parse during installPackageLI: /data/app/vmdl1629738225.tmp/base.apk (at Binary XML file line #75): androidx.media.session.MediaButtonReceiver: 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
我正在开发React Native应用程序,当我试图通过Android Studio运行应用程序时,面临这个问题,并且还尝试了仍然面临这个问题的所有内容INSTALL_PARSE_FAILED_MANIFEST_MALFORMED
这是我的AndroidManifest.xml
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.myplayer">
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="com.android.vending.BILLING" />
<application
android:name=".MainApplication"
android:label="@string/app_name"
android:icon="@mipmap/ic_launcher"
android:roundIcon="@mipmap/ic_launcher_round"
android:allowBackup="false"
android:theme="@style/AppTheme">
<activity
android:name=".MainActivity"
android:label="@string/app_name"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode"
android:launchMode="singleTask"
android:windowSoftInputMode="adjustResize"
android:exported="true"
>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="com.facebook.react.devsupport.DevSettingsActivity" />
</application>
</manifest>
1条答案
按热度按时间nhaq1z211#
androidx.media.session.MediaButtonReceiver: Targeting S+ (version 31 and above) requires that an explicit value for android:exported be defined when intent filters are present
这一行被错误地提及,因此,您需要更新使用
androidx.media.session.MediaButtonReceiver
的lib,或者您可以将这一行添加到AndroidManifest.xml
文件中的<application>
标记下,因为目标S+
需要为每个活动、接收者和服务提及android:exported