Problem: I am working on developing an application in android studio, and was able to install application on my physical device(One plus nord) up until recently when i downloaded and installed a new software update on my phone. Since then i am not able to install any application through android studio and i get an error:
Installation did not succeed.
The application could not be installed: INSTALL_PARSE_FAILED_MANIFEST_MALFORMED
List of apks:
[0] 'D:UsersvineeAndroid Studio AppsParkingSystemappbuildoutputsapkdebugapp-debug.apk'
Installation failed due to: 'null'
every time i try to install the application on my device.
What I have done: I have tried various solution from including an installation flag -r -t to changing the project name to all small letters and cleaning and building the project again. Doing all this i could figure out the exact cause of this problem.
The same application is installed onto a same company phone with yet to be updated software(One plus 9pro) and the same problem follows with my previously finished project which ran on all devices, so it would not be an issue with the build of the project and yes i the application is installing and running on all my virtual devices.
There is no issue with the USB cable, USB debugging is turned on and there appears to be no option to enable install from unknown sources on my phone(old or new), also not able to revert back to the previous software version in my phone.
Device details:
Android studio:4.1.1
One plus Nord: Android 12
One plus 9 Pro: Android 11.
Build details:
android {
compileSdkVersion 33
buildToolsVersion "32.0.0"
defaultConfig {
applicationId "com.example.parkingsystem"
minSdkVersion 24
targetSdkVersion 33
versionCode 1
versionName "1.0"
multiDexEnabled true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
I have been trying to resolve this issue i even changed the sdk version to 33 from 32, changing buildtool vesion to 33.0.0 yeilds an error that it is corrupted.
What can be done to resolve this issue?
Thank you.
Edited: my manifest file.
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.parkingsystem">
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<queries>
<package android:name="com.google.android.apps.maps"/>
</queries>
<application
android:allowBackup="true"
android:hardwareAccelerated="false"
android:icon="@mipmap/launcher_logo"
android:label="@string/app_name"
android:largeHeap="true"
android:roundIcon="@mipmap/launcher_logo"
android:supportsRtl="true"
android:theme="@style/Theme.ParkingSystem"
android:exported="true">
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="@string/google_maps_key" />
<activity android:name=".vehicle_type_selection"
android:exported="true"/>
<activity android:name=".registration"
android:exported="true"/>
<activity android:name=".otpverificationactivity"
android:exported="true"/>
<activity
android:name=".homeactivity"
android:screenOrientation="portrait"
android:theme="@style/Theme.ParkingSystem.NoActionBar"
android:exported="true"/>
<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>
</application>
</manifest>
2
Answers
From error it looks like the problem is with your Manifest file try the following solutions maybe it could help:
1 – Make sure all required attribs are there in manifest file, such as the package name, application name, and permissions.
2 – Make sure that the manifest file is well-formed and that all elements and attributes are properly formatted and closed.
3 – Make sure min and target sdk versions are compatible.
4 – Check if there are any duplicate permissions.
First thing I would suggest is you update your Android Studio (4.1.1) as mentioned in your question, 4.1.1 is over 2 years old now.
Second thing is you should look into your AndroidManifest.xml file as
INSTALL_PARSE_FAILED_MANIFEST_MALFORMED
indicated there is an issue in your manifest. Make sure each one of your<activity...>
or<service...>
tag hasandroid:exported=true
orandroid:exported=false
attribute.Third thing would be that you edit your question with your manifest so other people can look at it and give suggestions according to it.
Also checkout Installation error: INSTALL_PARSE_FAILED_MANIFEST_MALFORMED? to check for yourself