Failure [INSTALL_FAILED_OLDER_SDK] Android Studio

前端 未结 4 1099
北恋
北恋 2020-12-02 02:06

I\'m new to Android and I\'m using the Android Studio. I\'ve created a new project just to show the Hello World! but I can\'t get it working on the AVD because of this error

相关标签:
4条回答
  • 2020-12-02 02:37

    I think projects with

     compileSdkVersion 'android-L'
    

    cannot be installed in other Android versions right now. I might be wrong there but if you're not doing anything specific to the L preview SDK, just set the compile version to one of the official ones. Same goes for the targetSdk.

    You can choose those in the Create Project wizard.

    0 讨论(0)
  • 2020-12-02 02:48

    If you get this error when compiling Adobe AIR mobile app - just correct "minSdkVersion" this line in the application descriptor xml file:

    <uses-sdk android:minSdkVersion="13" android:targetSdkVersion="15"></uses-sdk> 
    
    0 讨论(0)
  • 2020-12-02 02:49

    I fixed this problem. I just modified the compileSdkVersion from android_L to 19 to target my nexus 4.4.4.

    buildscript {
        repositories {
            jcenter()
        }
        dependencies {
            classpath 'com.android.tools.build:gradle:0.12.2'
        }
    }
    apply plugin: 'com.android.application'
    
    repositories {
        jcenter()
    }
    
    android {
        **compileSdkVersion 'android-L'** modified to 19
        buildToolsVersion "20.0.0"
    
        defaultConfig {
            applicationId "com.antwei.uiframework.ui"
            minSdkVersion 14
            targetSdkVersion 'L'
            versionCode 1
            versionName "1.0"
        }
        buildTypes {
            release {
                runProguard false
                proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            }
        }
    }
    
    dependencies {
        compile fileTree(dir: 'libs', include: ['*.jar'])
        **compile 'com.android.support:support-v4:21.+'** modified to compile 'com.android.support:support-v4:20.0.0'
    }
    

    how to modified the value by ide. select file->Project Structure -> Facets -> android-gradle and then modified the compile Sdk Version from android_L to 19

    sorry I don't have enough reputation to add pictures

    0 讨论(0)
  • 2020-12-02 02:56

    Unless you know you want to be using the Android L developer preview with your application, do not target and compile with it. It is still very much a preview release, and it appears as though applications targeting and compiling for the preview cause this error with any non-L device.

    Update these lines in your build.gradle to stick with the latest stable release (Android 4.4, API 19):

    android {
        compileSdkVersion 19
    
        defaultConfig {
            targetSdkVersion 19
        }
    }
    
    0 讨论(0)
提交回复
热议问题