0

I get the following error when I run the application on my phone via Android Studio.

Error Popup

I have checked, there is no version of this app installed on any of the user accounts on my phone. My build.gradle file contains defaultConfig.applicationId = "com.fyp.agripoint" Here is the AndroidManifest.xml file

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.fyp.agripoint">
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="android.permission.CALL_PHONE" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.WAKE_LOCK" />
    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="AgriPointApp"
        android:supportsRtl="true">
        <activity
            android:name=".MainActivity"
            android:theme="@style/AppChildTheme">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
            android:name=".buysell.MainActivityMap"
            android:theme="@style/AppChildTheme">
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value=".MainActivity" />
        </activity>
        <activity
            android:name=".calendar.MainActivityCalendar"
            android:theme="@style/AppChildTheme">
            <meta-data
                android:name="android.support.PARENT_ACTIVITY"
                android:value=".MainActivity" />
        </activity>
        <meta-data
            android:name="com.google.android.geo.API_KEY"
            android:value="@string/google_maps_key" />
        <service
            android:name=".location.LocationService"
            android:enabled="true"
            android:exported="true" />
        <service
            android:name=".location.test"
            android:enabled="true"
            android:exported="true" />
        <activity
            android:name=".mandi.MandiRateActivity"
            android:theme="@style/AppChildTheme" />
        <meta-data
            android:name="io.fabric.ApiKey"
            android:value="my_key" />
        <activity
            android:name=".profile.ProfileActivity"
            android:theme="@style/AppChildTheme" />
        <activity
            android:name=".profile.PrefsActivity"
            android:theme="@style/AppChildTheme" />
        <activity
            android:name=".profile.EditProfileActivity"
            android:theme="@style/AppChildTheme" />
        <activity
            android:name=".events.MainActivityEvent"
            android:theme="@style/AppChildTheme" />

        <receiver
            android:name=".events.AlarmReceiver"
            android:process="remote" />
        <service
            android:name=".events.NotificationService"
            android:enabled="true"
            android:exported="true" />
        <activity
            android:name=".articles.MainActivityArticles"
            android:theme="@style/AppChildTheme" />
        <activity
            android:name=".articles.ArticleDetail"
            android:theme="@style/AppChildTheme" />
    </application>
</manifest>
Iffat Fatima
  • 1,610
  • 2
  • 16
  • 27
  • Generally happens when there is another application installed on device and you just changed Manifest file and trying to push it [ Dex incorrect ] . If this be a bug in android studio , try to Clean and Rebuild project it will get solved automatically , Hot load sometimes fails to update the Dex in cache . – Vikrant Apr 25 '17 at 08:46
  • 1
    Possible duplicate of [How to fix INSTALL\_PARSE\_FAILED\_MANIFEST\_MALFORMED in my android application](http://stackoverflow.com/questions/12396351/how-to-fix-install-parse-failed-manifest-malformed-in-my-android-application) –  Apr 25 '17 at 08:54
  • @Ashish the question u linked to doesn't solve my problem. I have tried all solutions mentioned in that answer. – Iffat Fatima Apr 25 '17 at 10:19
  • Did you found a solution? – Pablo Dec 22 '17 at 12:36
  • @Pablo I created the whole manifest file again manually and it fixed the issue. I don't remember exactly what the issue was though. – Iffat Fatima Jan 01 '18 at 04:24

1 Answers1

0

Specify complete activity name in manifest.

Always use:

www.yourcompany.com.MainActivity

instead of :

.MainActivity
Stephen Rauch
  • 47,830
  • 31
  • 106
  • 135
kamranbhatti585
  • 232
  • 2
  • 16