0

In an Android application,
The following error is exhibited in Android 12 and 13:

INSTALL_PARSE_FAILED_MANIFEST_MALFORMED

I searched a lot and did some actions (like android:exported="true" in activities) but the problem persists yet
By the way, the name of the package does not include camel letters too

Manifest File is as following:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    package="com.example.vh80705.myapplication6"
    tools:ignore="CoarseFineLocation">

    <uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
    <uses-permission android:name="android.permission.READ_CONTACTS" />
    <uses-permission android:name="android.permission.RECEIVE_SMS" />
    <uses-permission android:name="android.permission.READ_SMS" />
    <uses-permission android:name="android.permission.SEND_SMS" />
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.CAMERA" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"
        tools:ignore="CoarseFineLocation" />

    <application
        android:name=".A0_Application.MemoryLeakApplication_Application"
        android:largeHeap="true"
        android:allowBackup="false"
        android:windowSoftInputMode="adjustResize"
        android:icon="@drawable/koalaicon"
        android:label="@string/app_name"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/AppTheme"

        >

        <activity
            android:name="com.example.vh80705.myapplication6.A1_Dispatch.A1_SplashScreen_Activity.SplashScreen_Activity"
            android:screenOrientation="fullSensor"
            android:theme="@android:style/Theme.Black.NoTitleBar"
            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=".A1_Dispatch.A2_MagicCode_Activity.MagicCode_Activity"
            android:label="MagicCode"
            android:exported="true">

        </activity>
        <activity android:name=".A1_Dispatch.A2_MagicCode_Activity.MagicCode_PhoneNumber_Activity"
            android:exported="true"/>
        <activity android:name=".A1_Dispatch.A3_StoresList_Activity.StoresList_Activity"
            android:exported="true"/>
        <activity android:name=".A2_Main.MainActivity"
            android:exported="true"
    />

    <provider
        android:name="android.support.v4.content.FileProvider"
        android:authorities="com.example.vh80705.myapplication6.provider"
        android:exported="false"
        android:grantUriPermissions="true">
        <meta-data
            android:name="android.support.FILE_PROVIDER_PATHS"
            android:resource="@xml/file_paths" />
    </provider>
</application>
</manifest>

Edit:
full error is as following:

Installation failed due to: 'Failed to commit install session 512549569 with command cmd package install-commit 512549569. Error: INSTALL_PARSE_FAILED_MANIFEST_MALFORMED: Failed parse during installPackageLI: /data/app/vmdl512549569.tmp/base.apk (at Binary XML file line #94): 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'

Vishal Vasani
  • 647
  • 8
  • 16
AndroidPlayer2
  • 346
  • 1
  • 2
  • 13
  • Did you by any change generated this manifest.xml from attempting to decompile an app? The names of activities seems weird, other than that I'm not seeing anything worth mentioning in the XML – Dan Baruch Aug 29 '22 at 10:49
  • no, this is the original manifest file – AndroidPlayer2 Aug 29 '22 at 10:53
  • 1
    According to https://stackoverflow.com/questions/69345255/the-application-could-not-be-installed-install-parse-failed-manifest-malformed in the full error code you should see the line which is creating the problem, can you see that? Might make it easier to find the cause – Dan Baruch Aug 29 '22 at 10:55
  • By the way, your Provider is exported="false", did you try setting that to true? – Dan Baruch Aug 29 '22 at 10:56
  • Well done, I edited the question with full code error and it indicates the problem is leak canary activity, but apparently this activity is internal and I can't find it – AndroidPlayer2 Aug 29 '22 at 11:09
  • Version 2.9.1 of leak canary has solved the problem in Android 12 + – AndroidPlayer2 Aug 29 '22 at 11:43

1 Answers1

0

I enabled full code error via

Compiler => Command-line Options => --stacktrace --info --debug

And saw the problem is leak canary activity
The point is the export issue on Android 12+ is solved in

Version 2.9.1

of leak canary

AndroidPlayer2
  • 346
  • 1
  • 2
  • 13