问题描述
我的 Android 应用程序无法安装在一些“随机”的旧 API 设备(任何低于 API 级别 25 的设备)上并出现错误:
INSTALL_PARSE_Failed_MANIFEST_MALFORMED
所以,基本上看起来…… API
我见过类似的问题,其中答案与小写的包名有关。我已经有了。
有人有什么想法吗?
清单:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="128" android:versionName="1.2.8.0" package="com.vrgamestudio.thegame" android:targetSandBoxVersion="2" android:installLocation="auto">
<uses-sdk android:targetSdkVersion="29" />
<application android:isGame="true" android:label="@string/ApplicationName" android:icon="@drawable/GameThumbnail" android:theme="@style/Theme.Splash">
<activity android:name="TheGame.ActivityMain" android:alwaysRetainTaskState="true" android:launchMode="singleInstance" android:screenorientation="fullSensor" android:configChanges="orientation|keyboard|keyboardHidden|screenSize|screenLayout">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name="TheGame.ActivityTV" android:icon="@drawable/gamethumbnail" android:theme="@style/Theme.Leanback" android:banner="@drawable/banner320x180" android:alwaysRetainTaskState="true" android:launchMode="singleInstance" android:screenorientation="fullSensor" android:configChanges="orientation|keyboard|keyboardHidden|screenSize|screenLayout">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LEANBACK_LAUNCHER" />
</intent-filter>
</activity>
</application>
<uses-feature android:name="android.hardware.gamepad" android:required="false" />
<uses-feature android:name="android.hardware.touchscreen" android:required="false" />
<uses-feature android:name="android.hardware.faketouch" android:required="false" />
<uses-feature android:name="android.hardware.telephony" android:required="false" />
<uses-feature android:name="android.hardware.camera" android:required="false" />
<uses-feature android:name="android.hardware.nfc" android:required="false" />
<uses-feature android:name="android.hardware.location.gps" android:required="false" />
<uses-feature android:name="android.hardware.microphone" android:required="false" />
<uses-feature android:name="android.hardware.sensor" android:required="false" />
<uses-feature android:name="android.software.leanback" android:required="false" />
<uses-feature android:name="android.hardware.type.television" android:required="false" />
<uses-feature android:name="android.software.leanback_only" android:required="false" />
</manifest>
顺便说一句,我使用的是 Visual Studio 2019 和 MonoGame 3.7
解决方法
解决并在此处发布答案:
https://community.monogame.net/t/install-parse-failed-manifest-malformed-only-on-some-devices
简而言之,答案是:
在较旧的 api 版本(
Activity Name 属性的全限定命名空间必须是 小写。