Throughout the project, it was possible to install the app from Android studio in different versions of Android and there has never been a problem. When I generated the apk today, when installing it on phones whose Android version exceeds 7 there is no problem, but if the version is lower it does not let install. I have made sure that it allows for eternal applications and the instant run is deactivated
build.gradle Module:
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion '26.0.1'
defaultConfig {
applicationId "com.drinkme.sdm.myapplication"
minSdkVersion 21
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner
"android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'),
'proguard-rules.pro'
}
}
}
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'
})
//noinspection GradleCompatible
compile 'com.android.support:appcompat-v7:26.+'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:design:26.+'
compile 'com.android.support:support-v4:26.+'
compile 'android.arch.lifecycle:extensions:1.0.0-rc1'
compile 'android.arch.persistence.room:runtime:1.0.0-rc1'
testCompile 'junit:junit:4.12'
annotationProcessor 'android.arch.lifecycle:compiler:1.0.0-rc1'
annotationProcessor 'android.arch.persistence.room:compiler:1.0.0-rc1'
}
build.gradle Project:
buildscript {
repositories {
jcenter()
maven {
url 'https://maven.google.com/'
name 'Google'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
maven { url 'https://maven.google.com' }
maven {
url 'https://maven.google.com/'
name 'Google'
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Manifest:
<application
android:allowBackup="true"
android:icon="@mipmap/mediano_sin_fondo"
android:label="@string/app_name"
android:roundIcon="@mipmap/mediano_sin_fondo"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity
android:name=".LoginActivity"
android:label="@string/title_activity_main">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".MainActivity"
android:label="@string/title_activity_main"
android:screenOrientation="portrait" />
<activity android:name=".crearCuenta.CrearCuentaActivity" />
<activity
android:name=".PerfilActivity"
android:label="Perfil"
android:screenOrientation="portrait" />
<activity
android:name=".MasLogrosActivity"
android:screenOrientation="portrait"
android:parentActivityName=".MainActivity">
</activity>
</application>
</manifest>
If you need more information, ask for it. Thank you very much in advance.