1

I try to install my app to my phone but I get app not installed error when sign as release apk this is my gradle for app

apply plugin: 'com.android.application'
android {
signingConfigs {
    signingConfigs {
        keyAlias 'newv'
        keyPassword 'key'
        storeFile file('/dir')
        storePassword 'pass'
   }}

my app have two module and below this file that i wan from package options

packagingOptions {
    pickFirst 'lib/armeabi-v7a/libc++_shared.so'
    pickFirst 'lib/armeabi/libc++_shared.so'
    pickFirst 'lib/arm64-v8a/libc++_shared.so'
    pickFirst 'lib/x86/libc++_shared.so'
    pickFirst 'lib/x86_64/libc++_shared.so'
    pickFirst 'lib/mips/libc++_shared.so'
    pickFirst 'lib/mips64/libc++_shared.so'
}
dexOptions {
    maxProcessCount 8
    javaMaxHeapSize "1g"
    preDexLibraries true
}

compileSdkVersion 26
buildToolsVersion "26.0.1"
useLibrary 'org.apache.http.legacy'
defaultConfig {
    applicationId "com.sadeem.mobiletv"
    minSdkVersion 14
    targetSdkVersion 21
    versionCode 1
    versionName "1.0"
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
    debug {
        shrinkResources false
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        jniDebuggable true
    }
    release {
        shrinkResources false
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        jniDebuggable false
    }
}

}

dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
    exclude group: 'com.android.support', module: 'support-annotations'
})
compile project(':libvlc')
compile project(':api')

compile 'com.android.support:appcompat-v7:26.+'
compile 'com.android.support:design:26.+'
compile 'com.jakewharton:butterknife:7.0.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:support-v4:26.+'
compile 'com.android.support:recyclerview-v7:26.+'
testCompile 'junit:junit:4.12'

}

my gradle module one is

configurations.maybeCreate("default")

artifacts.add("default", file('api-release.aar'))

and two is

configurations.maybeCreate("default") artifacts.add("default", file('libvlc-3.0.0-null.aar'))

i do't why not install after release apk any one help

  • Try to use "v2SigningEnabled false" as described here https://developer.android.com/about/versions/nougat/android-7.0.html#apk_signature_v2 If it does not work - then generate apk manually, I suppose here is your answer - https://stackoverflow.com/questions/4226132/app-not-installed-error-on-android – Evgen Nov 08 '17 at 13:40
  • Also "signingConfigs { signingConfigs { " looks a little bit strange. – Evgen Nov 08 '17 at 13:46
  • i used it but give me the same error app un install – mohammedragabmohammedborik Nov 08 '17 at 13:52

2 Answers2

1

Looks like it's Android version issue. Try to select both the Signature Version check boxes while generating signed APK file i.e. v1 and v2. OR Try to uninstall earlier versions of your app (like debug APKs).

Kvaibhav01
  • 391
  • 1
  • 4
  • 14
0

I am sure that on your phone debug apk is installed. Please uninstall the debug apk and then install debug apk.

Arbaz Alam
  • 1,172
  • 1
  • 14
  • 24