Installation failed since app's minSdkVersion is newer than device's API level

喜夏-厌秋 提交于 2020-03-19 05:10:40

问题


Here is my gradle settings.

ext {
    android_compile_version = 26
    android_version = '26.0.1'
    android_min_sdk_version =15

    appcompat_library_version = '25.2.0'
    support_library_version = '25.2.0'
    gms_library_version = '11.0.4'
}

this is define in my project.gradle file and

apply plugin: 'com.android.application'

android {

    compileSdkVersion android_compile_version
    buildToolsVersion android_version

defaultConfig {

    applicationId "com.xxasda.stickman"

    minSdkVersion android_min_sdk_version
    targetSdkVersion compileSdkVersion
    versionCode 2
    versionName "1.1"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
    }
}
}

dependencies {
    compile "com.android.support:appcompat-v7:${appcompat_library_version}"
    compile "com.android.support:support-v4:${support_library_version}"
    compile project(':libraries:BaseGameUtils')
}

buildscript {
    repositories {
        jcenter()
    }
}

This is my Build.Gradle file I don't know why it's not compiling. but when I try to run application on emulator it throws me this error

Failure [INSTALL_FAILED_OLDER_SDK]


Installation failed since app's minSdkVersion is newer than device's API level (API 23).
Please update your apps minSdkVersion.
Error while Installing APK

I checked many times and replace min_sdk_version with absolute value 15 but still no luck.any one please advice it would be helpful.

Thank you. :)


回答1:


I'm also getting same issue

I have solved my issue making below changes

compileSdkVersion 'android-P'
targetSdkVersion 27

and the dependencies

implementation 'com.android.support:appcompat-v7:28.0.0-alpha1'
implementation 'com.android.support:design:28.0.0-alpha1'
implementation 'com.android.support:support-v4:28.0.0-alpha1'
implementation 'com.android.support:cardview-v7:28.0.0-alpha1'

hope it help someone



来源:https://stackoverflow.com/questions/45650173/installation-failed-since-apps-minsdkversion-is-newer-than-devices-api-level

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!