137

I am developing a small application that lists all the applications present/ installed on the android device. But I'm getting the below error while i'm trying to run the code.

Installation error: INSTALL_PARSE_FAILED_MANIFEST_MALFORMED

Please can any one help me to sort out this error.

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
S.P
  • 1,775
  • 5
  • 14
  • 21
  • 1
    There are many errors in the manifest.xml file that can cause this error code, see PackageParser.java error list answer below. – Ribo Sep 03 '14 at 13:54
  • 1
    You didn't accept an answer? – shieldgenerator7 Dec 16 '14 at 13:26
  • Follow this link You will get your answer http://stackoverflow.com/questions/16015033/installation-error-install-parse-failed-manifest-malformed/27520216#27520216 – Sritam Jagadev Dec 17 '14 at 07:29
  • Check this [link](http://stackoverflow.com/a/29238309/4525473) for a clear answer – Vishnuvathsan Mar 24 '15 at 16:47
  • If you have different packages and classes in your project.Change package name from upper letters to lower letters.Package name should start with lower letters – Waheed Akhtar Mar 28 '16 at 10:20
  • check your application id in build.gradle if you are using gradle. – user3508883 Dec 25 '16 at 17:50
  • INSTALL_PARSE_FAILED_MANIFEST_MALFORMED can be caused by many different reasons, can you share your manifest – Vishal Ambre Sep 12 '20 at 08:16
  • 1
    The reason is reported in Logcat https://stackoverflow.com/a/24750245/1916449 – arekolek Jun 24 '21 at 17:55
  • It happened to me after upgrading to targetsdk 31 – Hedron Dantas Dec 28 '21 at 19:57
  • This happened when I generated a new project. No matter what I did, I couldn't get around it. I generated a few more projects just to verify I wasn't a change I was making. In the end, the answer "android:exported="true"" by Bajrang Hudda found below was the fix. This is one reason I like to run generated boilerplate code before beginning my work. Unfortunately, it's a habit easy to skip. – Eric Engel Feb 25 '22 at 03:09

50 Answers50

92

There could be another reason for this error. The attribute

android:taskAffinity="string" 

Should always start with a dot, like:

android:taskAffinity=".string" 
Andy
  • 6,869
  • 2
  • 31
  • 24
  • 4
    Problem solved for me but, where can I find this information in documentation? there is nothing about a DOT here: https://developer.android.com/guide/topics/manifest/activity-element.html#aff – Beto Caldas May 19 '16 at 13:07
  • 2
    technically, taskAffinity doesn't have to start with dot, just containing is okay. – khcpietro May 31 '21 at 05:35
70

Activity name should be prefixed with "." in your manifest file.

  • in Manifest you declared package attribute with package, so when you create activity you put "." to be preceded by package name, you can also type the full name of the activity like : "com.example.test.Activity_Name", or ".Activity_Name" – Amt87 Sep 18 '12 at 07:40
50

The INSTALL_PARSE_FAILED_MANIFEST_MALFORMED error code is returned by PackageParser.java when it detects any of a large number of errors in the manifest.xml file.

To isolate the error, look in logcat (when you do the 'adb install foo.apk' command). In the problem I encountered, logcat contained:

W/ActivityManager(  360): No content provider found for permission revoke: file:///data/local/tmp/foo.apk
D/Finsky  (32707): [1] PackageVerificationReceiver.onReceive: Verification requested, id = 6
D/Finsky  (32707): [1] WorkerTask.onPreExecute: Verification Requested for id = 6,   data=file:///data/local/tmp/foo.apk flags=112 fromVerificationActivity=false
W/PackageParser(32707): /data/local/tmp/foo.apk (at Binary XML file line #214): <provider> does not include authorities attribute
D/Finsky  (32707): [716] PackageVerificationService.getPackageInfo: Cannot read archive for file:///data/local/tmp/foo.apk in request id=6
D/Finsky  (32707): [1] PackageVerificationReceiver.onReceive: Verification requested, id = 6
W/ActivityManager(  360): No content provider found for permission revoke: file:///data/local/tmp/foo.apk
I/PackageManager(  360): Copying native libraries to /data/app-lib/vmdl1205566381
W/PackageParser(  360): /data/app/vmdl1205566381.tmp (at Binary XML file line #214): <provider> does not include authorities attribute

In the fourth line above, you can see that PackageParser complains that line #214 of the manifest.xml file "<provider> does not include authorities attribute". See the listing below of all the cases in PackageParser that returns that error code. (PackageParser is the only class that produces the PackageManager.INSTALL_PARSE_FAILED_MANIFEST_MALFORMED error code)

In my case the message "<provider> does not include authorities attribute" is produced by line 2490 of PackagerParser.java in the parseProvider function called by parseApplication.


From the 4.1.1 version of frameworks/base/core/java/android/content/pm/PackageParser.java, PackageManager.INSTALL_PARSE_FAILED_MANIFEST_MALFORMED is referenced on these lines in these methods. If the source code line number is followed by a quoted string that is the message printed in logcat. if the line number is followed by a Java expression that is the code that caused that error code to be returned that that function should be investigated to see what caused the error message to be returned. In a couple cases I couldn't isolate the error cause to one specific method call.

in parsePackage:
  536:  (only used in 'core apps' with no 'pkg')
  973:  "<manifest> has more than one <application>"
  1275: "Bad element under <manifest>: "      --if RIGID_PARSER

in parsePermissionGroup:
  1464: !parsePackageItemInfo(owner, perm.info, outError,
    "<permission-group>", sa,
    com.android.internal.R.styleable.AndroidManifestPermissionGroup_name,
    com.android.internal.R.styleable.AndroidManifestPermissionGroup_label,
    com.android.internal.R.styleable.AndroidManifestPermissionGroup_icon,
    com.android.internal.R.styleable.AndroidManifestPermissionGroup_logo)
  1482: !parseAllMetaData(res, parser, attrs, "<permission-group>", perm,
    outError)

in parsePermission:
  1506: !parsePackageItemInfo(owner, perm.info, outError,
    "<permission>", sa,
    com.android.internal.R.styleable.AndroidManifestPermission_name,
    com.android.internal.R.styleable.AndroidManifestPermission_label,
    com.android.internal.R.styleable.AndroidManifestPermission_icon,
    com.android.internal.R.styleable.AndroidManifestPermission_logo)
  1530: "<permission> does not specify protectionLevel"
  1541: "<permission>  protectionLevel specifies a flag but is not based on signature type"
  1548: !parseAllMetaData(res, parser, attrs, "<permission>", perm, outError)

in parsePersmissionTree:
  1572: !parsePackageItemInfo(owner, perm.info, outError,
    "<permission-tree>", sa,
    com.android.internal.R.styleable.AndroidManifestPermissionTree_name,
    com.android.internal.R.styleable.AndroidManifestPermissionTree_label,
    com.android.internal.R.styleable.AndroidManifestPermissionTree_icon,
    com.android.internal.R.styleable.AndroidManifestPermissionTree_logo)
  1585: "<permission-tree> name has less than three segments: "+perm.info.name
  1595: !parseAllMetaData(res, parser, attrs, "<permission-tree>", perm, outError)

in parseInstrumentation:
  1625: new Instrumentation(mParseInstrumentationArgs, new InstrumentationInfo())
  1648: "<instrumentation> does not specify targetPackage"
  1654: !parseAllMetaData(res, parser, attrs, "<instrumentation>", a, outError)

in parseApplication:
  1678: buildClassName(pkgName, name, outError) == null
  1851: (Set by various other functions)
  1869: parseActivity(owner, res, parser, attrs, flags, outError, false, hardwareAccelerated) == null
  1878: parseActivity(owner, res, parser, attrs, flags, outError, true, false) == null
  1887: parseService(owner, res, parser, attrs, flags, outError) == null
  1896: parseProvider(owner, res, parser, attrs, flags, outError) == null
    2484: "Heavy-weight applications can not have providers in main process"
    2890: "<provider> does not incude authorities attribute"
  1905: parseActivityAlias(owner, res, parser, attrs, flags, outError) == null
  1917: parseMetaData(res, parser, attrs, owner.mAppMetaData, outError) == null
  1969: "Bad element under <application>: "+tagName

It's regrettable that you have to poke around in logcat and the source to figure out what causes a problem.

Ribo
  • 3,363
  • 1
  • 29
  • 35
48

I was having this error because i had capital letters in my package name like this

Com.Example.packagename

after i had changed it to something like

com.example.packagename

it was solved

Kamil Budziewski
  • 22,699
  • 14
  • 85
  • 105
Samuel
  • 489
  • 4
  • 4
  • this solved my problem. My activity class was under a package which called Activities, and i add it to manifest before this error appeared. when i changed the Activities package name to activities, it solved. Thanks – alicanbatur Nov 26 '13 at 11:38
  • 4
    I think you can have capital letters in the package name, however, the 1st letter in the package name cannot be a capital letter. So "myActivity" = OK but "MyActivity"= Not OK – Gene Aug 18 '14 at 22:17
46

In Android 12 or Android S [You can check to make targetSdkVersion "S" to targetSdkVersion 30 it will work fine]. For this, to work we need to update all of our dependencies to the latest one and have to add -

android:exported="true"

to to any activity, activity-alias, service, or receiver components that have intent-filters declared in the app’s AndroidManifest.xml file. Because there are few behaviors changed in Android 12.

Bajrang Hudda
  • 3,028
  • 1
  • 36
  • 63
26

Add

android:exported="true"

to your activity in Manifest.xml

Like this;

<activity
    android:name=".MainActivity"
    android:exported="true">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
</activity>
Sam Justman
  • 382
  • 3
  • 9
9

I have the same issue but when i call process like this:

<service
    android:name="com.dexode.tama.AppService"
    android:process="screen" >
</service>

When i change to:

<service
    android:name="com.dexode.tama.AppService"
    android:process=":screen" >
</service>

Everything starts working.

Gelldur
  • 11,187
  • 7
  • 57
  • 68
  • 2
    By adding the ':' you changed the semantics of the code. In the second case the application will create a new process for the service which is available to that application only. http://developer.android.com/guide/topics/manifest/service-element.html#proc. Instead the error can be fixed by mentioning the complete package name instead of just the word 'screen'. – shshnk Oct 15 '15 at 08:19
9

I ran into the same problem time ago, in the android docs they said that if you don't use ":" as prefix in android:process you should use a lower case letter, but they never said that, then it should be a package like process name, like com.company.app.services.MyService

4gus71n
  • 3,717
  • 3
  • 39
  • 66
  • 1
    Even I had the same problem. They should have mentioned the we need to include package name for when not using ':' – shshnk Oct 15 '15 at 08:11
9

Check your Activity name in manifest file

or the Package name in main activity/class

<activity android:name="MainActivity"></activity>
vinay Maneti
  • 1,447
  • 1
  • 23
  • 31
Diptendu
  • 107
  • 2
7

My issue was that I had written (Notice the - vs. the _):

<meta_data ... /> 
<!-- instead of -->
<meta-data ... />

under an activity. This might be the cause of your issue as well.

Ymabob
  • 79
  • 1
  • 3
7

Any name such as android:name, android:process should be in form of package name: starts with a..z, combines with others with ., do not end with ....

  • @IgorG. Sorry I lost my point :-( But the new SDK removed that field ([here](http://developer.android.com/sdk/api_diff/4/changes/android.content.pm.PackageManager.html)). –  May 06 '12 at 02:08
  • 1
    Thank you. I called a process such a way: `android:process="com.my_pack.services.MyServiceProcess"` (com.my_pack.services is the package where my service is) and the installation error will not show up after that. – Maksim Dmitriev Feb 01 '13 at 06:21
5

Read your Android device logs to diagnose this error. Expect a "W/PackageParser" line explaining the problem.

Dan Fabulich
  • 37,506
  • 41
  • 139
  • 175
5
        <activity android:name=".MainActivity"
        android:exported="true">
        <intent-filter>
            <action android:name="android.intent.action.MAIN"/>

            <category android:name="android.intent.category.LAUNCHER"/>
        </intent-filter>
    </activity>

if you're using target API 31+ you have to add exported with true

omarezz332
  • 127
  • 1
  • 5
4

I had this error because of the code below:

<intent-filter>
     <action android:name="android.intent.action.VIEW" />
     <category android:name="android.intent.category.DEFAULT" />
     <data android:mimeType="*" android:host="*" android:scheme="content" />
</intent-filter>

When I changed android:mimeType="*" to android:mimeType="*/*", it fixed the error.

Sayooj
  • 766
  • 5
  • 23
Ke Di
  • 345
  • 1
  • 12
4

In my case I was referring to an icon using an attribute like this:

<meta-data android:name="com.google.firebase.messaging.default_notification_icon" android:resource="?attr/ic_notify" />

instead of the drawable:

<meta-data android:name="com.google.firebase.messaging.default_notification_icon" android:resource="@drawable/ic_notify" />

I am using this attribute in several places but it seems it does not work in manifest.

M.Sameer
  • 3,072
  • 1
  • 24
  • 37
  • Exactly my case. I need it to be a different color depending on user's preferences. Sadly, android:resource doesn't accept attributes... – Elyakim Levi Feb 16 '18 at 20:12
3

Got the same error! had empty permission tag and that was causing the problem!

3

I run into the same problem after adding localizations

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="my.package"
    android:versionCode="10"
    android:versionName="@string/version_name" >

The string @string/version_name accidentally passed into one of new added localized string-file (it appeared only in the new files). After checking all the localizations and removing @string/version_name from every file except eng locale everything worked again

vir us
  • 9,920
  • 6
  • 57
  • 66
3
<activity/>

must be defined BEFORE

<activity-alias/>
Ajvo
  • 148
  • 8
3

activity created name folder must be small letters, Dont use capital letters for activity folder name.... its always better to use small letters.

Khan
  • 151
  • 1
  • 4
3

this can be for many reasons , but for me it was solved by changing the name of package with lowercase name (package name was Activities , solved with activities) .

Diyako
  • 651
  • 1
  • 9
  • 24
3

[Solution] Go to your project folder and open AndroidManifest.xml file

Add the below code in activity

android:exported="true"

Example

<activity
 android:name=".MainActivity"
 android:exported="true"
 android:launchMode="singleTop"
 android:theme="@style/LaunchTheme"
</activity>
Thilina Chamika
  • 206
  • 3
  • 4
2

If you are using multidex in manifest then it should be added with value or resource. Like..

<meta-data android:name="android.support.multidex.MultiDexApplication"
android:value="@string/yourValue" />

OR

<meta-data android:name="android.support.multidex.MultiDexApplication"
android:resource="@string/yourValue" />

then clean the project and reinstall the app.

Sam
  • 171
  • 1
  • 11
2

Target <activity> needs to be specified before the <activity-alias>.

Eugen Pechanec
  • 37,669
  • 7
  • 103
  • 124
2

I create a new application and target it to Android Pie. Everything was working well and good then lately I found that my application don't installs to Android Naught and below version of Android OS.

While installing, I see failure message

Installation failed with message INSTALL_PARSE_FAILED_MANIFEST_MALFORMED.

So what fixes which I made are as follow and they all need to be done in AndroidManifest.xml file only.

For activity, service, receiver and all

Instead of:
    android:name=".service.MyService"

Used: 
    android:name="com.complete.appicationID.service.MyService"

For Manifest permissions

Instead of: 
     <uses-permission android:name="{applicationId}.permission.MAPS_RECEIVE" />
     <permission
         android:name="{applicationId}.permission.MAPS_RECEIVE"
         android:protectionLevel="signature" />

Used:
     <uses-permission android:name="com.complete.appicationID.permission.MAPS_RECEIVE" />
     <permission
         android:name="com.complete.appicationID.permission.MAPS_RECEIVE"
         android:protectionLevel="signature" />

That were all changes which I had to perform to make it work for lower version devices as well.

Harpreet
  • 2,990
  • 3
  • 38
  • 52
2

if you're using target api 31 or 32 in Android 12 or Android S so you'd face this error to solve this

Add this line to the laucher activity in Manifest

android:exported="true"

This element sets whether the activity can be launched by components of other applications:

  • If "true", the activity is accessible to any app, and is launchable by its exact class name.
  • If "false", the activity can be launched only by components of the same application, applications with the same user ID, or privileged system components. This is the default value when there are no intent filters.

Whether or not hardware-accelerated rendering should be enabled for this Activity — "true" if it should be enabled, and "false" if not. The default value is "false".

<activity
    android:name=".MainActivity"
    android:exported="true">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />
            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
</activity>
Rehan Khan
  • 1,031
  • 13
  • 10
2

If you have AndroidStudio 4.1.2 try to add : android:exported="true" & android.name=".MainActivity" in the file "AndroidManifest.xml"

platform/android/AndroidManifest.xml

Your application & activity should seen be this way:

<application .....
  <activity android:exported="true" android:name=".MainActivity" 
1

There could be other files that are malformed but aren't highlighted in the IDE, for example the res/values/strings which the manifest may reference for things like labels.

m_cheung
  • 331
  • 3
  • 6
1

In my case the cause was absence of android:name attribute in < activity-alias >. It is obligatory for < activity-alias > although it must not name an existing class. Funny thing is - the project compiles without problems.

Gena Batsyan
  • 736
  • 5
  • 14
1

My problem was as follows:

I was specifying my permissions in the following way and it was not working.

<permission android:name="android.permission.INTERNET">
    <meta-data />
</permission>
<permission android:name="android.permission.ACCESS_NETWORK_STATE">
    <meta-data />
</permission>

It was working fine when I changed it to be as follows:

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
shahensha
  • 2,051
  • 4
  • 29
  • 41
1

I was having this error because i had the line below.

android:protectionLevel="developer"

After I've changed it to

android:protectionLevel="signature"

issue was solved

Ryan
  • 4,799
  • 1
  • 29
  • 56
Swalih
  • 982
  • 10
  • 10
1

After struggling with this issue i found out that all values which are used as a string resource value (aka @string/) in the manifests (of the libraries you are using too), are not allowed to be part of strings.xml of localizations. Example: if your manifests file using @string/app_name, the definition of string/app_name is allowed only in your default values/strings.xml and not in the alternate string.xml file which you provide for localizations. I hope that helps..

Ozzz
  • 342
  • 5
  • 12
1

I had the very same error. i didn't have uppercase character in my package/application name and clean the project and other solutions also didn't help me out. after all i created new project and copy my stuff to the new one step by step and check if the problem pops up. after all i had a nice and error free project without any redundancy. sometimes it is hard to find source of this error so it is easier to take another approach.

i hope this helps somebody!

Mehran Zamani
  • 831
  • 9
  • 31
1

I faced this error when I put Application class in a wrong package!

farhad.kargaran
  • 2,233
  • 1
  • 24
  • 30
1

You probably have not followed the syntax rules of a tag. for example:

<meta-data
      android:name="preloaded_fonts"/>

This tag is incomplete and causes this error.

App Manifest Overview

gadolf
  • 1,035
  • 11
  • 19
1

Use android:resource in <meta-data> instead of android:src and android:srcCompat

Bibin Johny
  • 3,157
  • 1
  • 13
  • 16
1

I know it's late to answer here but i do strange mistake so post my answer if it help someone,In my case by mistake I Added Main launcher activity as alias

   <activity-alias
        android:name=".activities.SplashActivity"
        android:targetActivity=".activities.SplashActivity">

        <intent-filter>
            <action android:name="android.intent.action.MAIN"/>
            <category android:name="android.intent.category.LAUNCHER"/>
        </intent-filter>
    </activity-alias>

So When I try to run my app getting error

Error while Installing APK

Failure [INSTALL_PARSE_FAILED_MANIFEST_MALFORMED]

I just remove "-alias" word from activity registration and my app launch successfully.

Ajay Pandya
  • 2,417
  • 4
  • 29
  • 65
1

I had same issue on Android 12 and fixed it this:

If your app targets Android 12 or higher and contains activities, services, or broadcast receivers that use intent filters, you must explicitly declare the android:exported attribute for these app components. If the app component includes the LAUNCHER category, set android:exported to true. In most other cases, set android:exported to false.

Also I updated third party Dependencies.

Homa Shafiei
  • 41
  • 12
1

I have updated my code to Android 12 and solved this error by adding this in my

AndroidManifest.xml

android:exported="true"
1

If android:exported="true" is not working for you,

open file build.gradle (:app) remove this line:

debugImplementation 'androidx.fragment:fragment-testing:1.3.6'
0

In my case cause was the:

android:resource="@color/app_green"
Yvgen
  • 2,036
  • 2
  • 23
  • 27
0

In my case it was due of this line:

<application
        android:cantSaveState="true"

I would appreciate any comments why android:cantSaveState is not recognized by Android 11. Thank you!

Mike Keskinov
  • 11,614
  • 6
  • 59
  • 87
0

In my case I had deleted the line <action android:name="android.intent.action.MAIN" /> adding it back let the app run

<queries>

    <!-- Intent filter signatures that you are going to query: -->
    <intent>
        <action android:name="android.intent.action.MAIN" />

        <category android:name="android.intent.category.LAUNCHER" />
    </intent>
</queries>
Pythogen
  • 591
  • 5
  • 25
0

Today I found the same problem while testing one project but none of the solutions provided in the thread worked, I'll post my solution in case someone experiment something similar.

My error was with package name containing a hyphen (e.g. "my -home") and that translated in the taskAffinity was something like ("com.skd.my-home") which was causing the error. When I removed the hyphen and set another valid character like underscore I had the code properly working and installed in my device.

Luis Pascual
  • 256
  • 1
  • 3
  • 13
0

I was having this error because i had capital letters in my package name like this.

com.App.videoeditor

//to com.app.videoeditor

Mazhar Iqbal
  • 813
  • 7
  • 7
0

If any body faces the same problem while running androidTest. please follow this

please note: androidTest install_parse_failed_manifest_malformed related problem. this solution can be applied

application could not be installed: install_parse_failed_manifest_malformed

  • we debugged the apk using android studio, it gave error as Manifest malformed.
  • but for malformed Manifest we already handled the case by adding export key word.
  • again did line by line modification to manifest to check, whether it resolves. still problem not solved

Solution

  • I did reverse engineering of androidTest apk, there I found, we are using older library, and this is having older manifest format not supporting android 12. and activity and service with intent-filter not using export keyword
  • went back to android dependency library repo and found the new releases and replaced one by one and this solved my problem.

dependency page link:

https://developer.android.com/jetpack/androidx/releases/test

Ninja Master
  • 126
  • 3
0

Since now app update requires to target API level 31 (Android 12), you will need to add android:exported (true for main activity) flag to activity, service or receivers which includes intent:filter

 <activity android:exported="false" >
        <intent-filter>
        </intent-filter>
 </activity>

<service android:exported="false">
        <intent-filter>
        </intent-filter>
</service>
Vikrant Satpute
  • 123
  • 1
  • 5
0

You can try adding this in your manifest file application -> activity

android:exported="true"

I hope this helps.

0

As of 2023 while uploading your application to Google Play store your application must target SDK 31.

That being said every activity which has in the AndroidManifest.xml file the intent-filter defined should by default add the android:exported="true" attribute.

By default if the intent-filter does not contain you should set the android:exported="false". More on that matter Apps targeting Android 12

Most of the accepted answers already specify the before mentioned attribute and should solve the error at hand.

However it is also important that all the implemented libraries also contain the required attribute.

So you could have a case where you did change all your own AndroidManifest.xml but the libraries you use, are old and not updated, thus not having the newly required attribute.

In that case i suggest that you open your main AndroidManifest.xml (and merged manifest) and verify that any activity which is mentioned there complies with the requirements and indeed it contains the new attribute (no matter if it is set to true or false it must be there).

Additionally I would like to highlight that in case you have a Kotlin project, after targeting SDK 31 it is also required to set your Project Structure to a minimum of JDK 11+ (building release versions with older JDK such as 1.8 will most likely result in failure)

F.A. Botic
  • 71
  • 1
  • 2
0

The Problem

This INSTALL_PARSE_FAILED_MANIFEST_MALFORMED error only indicates there is an error within your manifest (or one of the manifests in your project & dependencies) that manifested (pun intended) itself when the app was pushed to an emulator or device for installation.

Installation failed due to: 'INSTALL_PARSE_FAILED_MANIFEST_MALFORMED: 

These runtime errors won't block compilation of the the project within Android Studio so at first view you get a Build Success and everything seems fine.

Finding the actual root source

Best solution is to start by making sure you have the latest build tools. That will increase the likelihood of having a proper error detail message like the one listed below. You can find this by opening the Run tab at the bottom in Android Studio to see the outcome of the installation adb commands.

Installation failed due to: 'INSTALL_PARSE_FAILED_MANIFEST_MALFORMED: Failed parse during installPackageLI: /data/app/vmdl1428212790.tmp/base.apk (at Binary XML file line #96): be.hcpl.android.phototools.links.AddLinkActivity: Targeting S+ (version 31 and above) requires that an explicit value for android:exported be defined when intent filters are present'

With all default settings this window should open after running the app. If not this is where to find it (also on a default layout that is).

android studio run tab

I've pasted the full error message here also so you can clearly see that in my case the detail message clearly indicates what the issue in the manifest is. Here; a missing export tag on the AddLinkActivity activity declaration.

Alternative Approach

If, for whatever reason, that detail message is missing or not clear enough to point to the root cause an alternative approach is to open the AndroidManifest.xml file in your project and then open the Problems tab.

enter image description here

This view is a list of all the errors and warnings found on that specific file, when Current File is selected.

In the file itself you can also see that the Activity declaration is marked in the editor. Including a quick fix tooltip to add the missing export tag.

hcpl
  • 17,382
  • 7
  • 72
  • 73
-1

I have had the same issue. I found the solution by just removing the last included plugin.LocalNotification nuget and it did sort it out