1

I have generated my signed apk for product flavors, but when i try to install the apk in my device, it says "App not installed"

Here is my gradle file code :-

android {
compileSdkVersion 25
buildToolsVersion "23.0.3"

defaultConfig {
    applicationId "com.app.olivesync"
    minSdkVersion 14
    targetSdkVersion 25
    multiDexEnabled true
}

compileOptions {
    sourceCompatibility JavaVersion.VERSION_1_7
    targetCompatibility JavaVersion.VERSION_1_7
}

packagingOptions {
    exclude 'META-INF/LICENSE'
    exclude 'META-INF/LICENSE.txt'
    exclude 'META-INF/NOTICE'
    exclude 'META-INF/NOTICE.txt'
    exclude 'META-INF/DEPENDENCIES'
}

buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
    }
}

productFlavors{

    main {
        applicationId "com.app.olivesync"
    }

     resonance {
         applicationId "com.app.resonance"
     }

}
dependencies {
compile('com.fasterxml.jackson.core:jackson-annotations:2.2.2') {
    exclude group: 'com.fasterxml.jackson.core'
}
compile('com.fasterxml.jackson.core:jackson-databind:2.2.3') {
    exclude group: 'com.fasterxml.jackson.core'
}
compile('com.fasterxml.jackson.core:jackson-core:2.2.3') {
    exclude group: 'com.fasterxml.jackson.core'
}

compile 'com.android.support:support-v4:25.3.0'
compile 'com.mcxiaoke.volley:library:1.0.19'
compile 'com.android.support:appcompat-v7:25.3.0'
compile 'de.hdodenhof:circleimageview:1.3.0'
compile 'com.roomorama:caldroid:3.0.1'
compile 'com.android.support:design:25.3.0'
compile 'com.google.android.gms:play-services-gcm:10.2.0'
compile 'com.microsoft.azure:notification-hubs-android-sdk:0.4@aar'
compile 'com.microsoft.azure:azure-notifications-handler:1.0.1@aar'
compile 'com.google.firebase:firebase-crash:10.2.0'
compile 'com.github.shell-software:fab:1.1.2'
compile 'com.android.support:cardview-v7:25.3.0'
compile 'com.getbase:floatingactionbutton:1.10.1'
compile 'com.github.iammert:MaterialIntroView:1.6.0'}

repositories {
    maven { url "https://jitpack.io" }
}

apply plugin: 'com.google.gms.google-services'
Andrii Abramov
  • 10,019
  • 9
  • 74
  • 96
Saikiran Bait
  • 31
  • 1
  • 9
  • follow this post....https://stackoverflow.com/questions/44543270/unable-to-instantiate-activity-component-info-class-not-found-exception-android/44545253#44545253 if this will not resolve then let me know. – Aniruddh Parihar Jun 15 '17 at 10:56
  • https://stackoverflow.com/questions/4226132/app-not-installed-error-on-android – IntelliJ Amiya Jun 15 '17 at 10:57
  • What error is returned by `adb` when you install app? – Artyom Jun 19 '17 at 10:35
  • Do you have the app on the device (with the same applicationId)?. If so try removing it first. When installing an app with same applicationId but different certificate this error may rise. – MTZ4 Aug 16 '17 at 11:28
  • Done. Actually i was building for debug one. So changing the build variants to release one solved the issue.Thank you everyone for helping :-) . – Saikiran Bait Aug 22 '17 at 08:17

1 Answers1

0

change your version and then try to build sign apk. Hope it will work.