0

I have a very similar issue, to this one: Error on installing apk - parsing the package

but the answers there didn't help me.

Shortly, I have an application that I develop, and in each big change that i make, I check it in my phone also. And it never had problems until now. I didn't do it for a week, and I changed things in the code, that I don't realy remember (problems with Git, another issue...). The app is using Firebase, so I had to update SDK on Android studio to 2.2.3. Maybe this is the problem? And if so, what is the solution? I can't think on another reason. On emulator it works great. Only on device it's not working. Until now, i just entered into APK folder in the project, and sent "app-debug.apk" to my mail, and I opened it in my phone mailbox. Now this file leads to "There is a problem parsing the package.".

So I tried to get the APK in different ways: 1. build-> build APK. 2. build-> generate signed APK, as mentioned in the answer in the link. 3. take the release APK. 4. take the debug APK. Nothing works!

I tried it on 2 devices:

Meizu M2, Android 5.1

LG 3 beat.

build.gradle:

buildscript {
repositories {
    jcenter()
}
dependencies {
    classpath 'com.android.tools.build:gradle:2.2.3'

    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
    classpath 'com.google.gms:google-services:3.0.0'
}



}

allprojects {
    repositories {
        jcenter()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

AndroidManifest:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="some package....">


<!--
            android:label="@string/app_name"

    -->

<application
    android:allowBackup="true"
    android:icon="@mipmap/ic_launcher"

    android:label="Mission List"

    android:supportsRtl="true"
    android:theme="@style/AppTheme">

    <activity android:name=".MainActivity">
                    some info...
    </activity>
    <activity android:name=".newList">
                    some info...
    </activity>
    <activity android:name=".viewGroups">
                   some info...
    </activity>


    <activity android:name=".tasks">
                    some info...
    </activity>
</application>

Please help!

Community
  • 1
  • 1
ayelet
  • 17
  • 1
  • 7

1 Answers1

0

This will happens when your are installing the app with applicationID which is already available on device.Two app with same appId.

Patel Jaimin
  • 231
  • 1
  • 11
  • Thanks @Patel Jaimin, i tried to change the application id with this guide: https://www.youtube.com/watch?v=_pneBqkFqfw but it says: "Error:Execution failed for task ':app:processDebugGoogleServices'. > No matching client found for package name 'the new name that i gave" – ayelet Feb 21 '17 at 15:29
  • anyway, i tried on third clean device, and it works there! thanks a lot! – ayelet Feb 21 '17 at 15:33
  • You need to change package name and according to appId in your bulid.gradle file. – Patel Jaimin Feb 22 '17 at 03:37