Android 项目在emulator(API级别L)上运行良好,但在我的设备(API 16)上运行不好

Android 项目在emulator(API级别L)上运行良好,但在我的设备(API 16)上运行不好,android,android-studio,Android,Android Studio,当我在APL级别L的emulator上运行我的项目时,它运行得很好,但它没有在我的设备上使用API 16运行。它显示“Failure[INSTALL\u FAILED\u OLDER\u SDK]”。我已经搜索了它并研究了其他帖子,但无法解决它。这是build.gradle和manifest文件 格雷德尔先生 apply plugin: 'android' android { compileSdkVersion 'android-L' buildToolsVersion "20

当我在APL级别L的emulator上运行我的项目时,它运行得很好,但它没有在我的设备上使用API 16运行。它显示“Failure[INSTALL\u FAILED\u OLDER\u SDK]”。我已经搜索了它并研究了其他帖子,但无法解决它。这是build.gradle和manifest文件

格雷德尔先生

apply plugin: 'android'

android {
    compileSdkVersion 'android-L'
    buildToolsVersion "20.0.0"

    defaultConfig {
        applicationId "com.facebooklogin"
        minSdkVersion 14
        targetSdkVersion 18
    }

    buildTypes {
        release {
            runProguard false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
        }
    }
}

dependencies {
    compile project(':facebookSDK')
    compile 'com.android.support:support-v4:+'
    compile 'com.android.support:appcompat-v7:+'
    compile 'com.google.android.gms:play-services:+'
    compile 'com.google.code.gson:gson:2.2.+'
    compile files('libs/gson-2.2.4.jar')
}
安卓清单

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.facebooklogin"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk
        android:minSdkVersion="14"
        android:targetSdkVersion="18" />
    <uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.GET_ACCOUNTS" />
    <uses-permission android:name="android.permission.USE_CREDENTIALS" />
    <application
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <meta-data
            android:name="com.google.android.gms.version"
            android:value="@integer/google_play_services_version" />
        <activity
            android:name=".SplashScreen"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
          <activity
            android:name=".ViewFlipperSampleActivity"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity
            android:name=".MainFragment"
            android:label="@string/app_name" >
            <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/app_name" >

        </activity>
        <meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/app_id"/>
        <activity android:label="@string/app_name" android:name="com.facebook.LoginActivity"></activity>
        <activity
            android:name="info.androidhive.slidingmenu.SlidingMenu"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>

</manifest>


编译dkversion'android-L'
更改为其他版本,例如
编译dkversion 19
。如果使用L Developer预览进行编译,则应用程序只能在运行L Developer预览的设备或模拟器上运行。

如果我将CompileSDK版本“android-L”更改为其他版本,则会显示错误错误:任务执行失败:iBL:processDebugManifest'>清单合并失败:使用sdk:MinsdkVersion14不能小于库com.android中声明的版本L。支持:support-v4:21.0.0-rc1“@陌生人您必须更改compile'com.android.support:support-v4:+'和compile'com.android.support:appcompat-v7:+'在compile'com.android.support:support:support-v4:19.+'compile'com.android.support:appcompat-v7:19.+'