【问题标题】:any suggest? Failure [INSTALL_FAILED_OLDER_SDK]有什么建议吗?失败 [INSTALL_FAILED_OLDER_SDK]
【发布时间】:2015-04-11 12:24:40
【问题描述】:

我的 build.gradle: 应用插件:'com.android.application'

android {
    compileSdkVersion 22
    buildToolsVersion "22.0.1"

    defaultConfig {
        applicationId "com.example.vladxd.trackingpoint_2"
        minSdkVersion 21
        targetSdkVersion 22
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:support-v13:22.0.0'
    compile 'com.android.support:support-v4:22.0.0'
    compile 'com.google.android.gms:play-services:7.0.0'
}

这是我的清单

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.vladxd.trackingpoint" >

    <!-- To access Google+ APIs: -->
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme" >
        <activity
            android:name="com.example.vladxd.trackingpoint.MainActivity"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

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


        <meta-data
            android:name="com.google.android.maps.v2.API_KEY"
            android:value="AIzaSyB5HcvlWp6AAUBU65Iq7CC_huQi_yK1XG8" />


    </application>

</manifest>

你知道我该如何解决吗?我试图在stackoverflow的另一篇文章中找到这个问题,但所有这些都对我不起作用......我不知道为什么。 所以如果你有任何想法请告诉我:D

对不起我的英语不好。

【问题讨论】:

  • 错误代码:pkg: /data/local/tmp/com.example.vladxd.trackingpoint_2 失败[INSTALL_FAILED_OLDER_SDK]

标签: android sdk android-manifest android-gradle-plugin build.gradle


【解决方案1】:

gradle 文件将构建设置为 minSdk 的 21,即 Android 5.0。该错误基本上是说您尝试安装的设备具有较旧的操作系统。

如果进入设备设置 -> 关于手机,应该有一个条目显示您的 Android 版本。这应该与http://developer.android.com/reference/android/os/Build.VERSION_CODES.html中的值一致

【讨论】:

  • 是的,这可能是原因
  • 谢谢人:你说得对,我没有设置 Android 版本,ty :)
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2014-01-04
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多