1

I generated an apk with Android Studio without problem, but when I try to Install in my phone android v4.4.2 this error show me " the app was not installed"

I don't understand, this is the configuration:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 28
    defaultConfig {
        applicationId "com.example.ejemplogpsmaps"
        minSdkVersion 19
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:28.0.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'

    implementation 'com.google.android.gms:play-services-maps:16.1.0'
}

then I tried to install on another phone, Samsung Galaxy s4 android v5.0.1 and the same error was displayed

Shankha057
  • 1,296
  • 1
  • 20
  • 38
Gerson
  • 67
  • 9

2 Answers2

0

First, check if the app been installed via USB. then check if the flavour is release and not debug. if it's in debug then try building another one with the release version selected

Chidi
  • 189
  • 2
  • 10
0

Android Jelly Bean 4.2.x is actually API level 17, which has to be declared accordingly:

minSdkVersion 17

And also, the Google Play Services plugin is missing:

apply plugin: "com.google.gms.google-services"
Martin Zeitler
  • 1
  • 19
  • 155
  • 216