简体   繁体   English

Android Studio失败[INSTALL_FAILED_OLDER_SDK]

[英]Android Studio Failure [INSTALL_FAILED_OLDER_SDK]

I'm new to programming and newer to programming with Android Studio 0.8.2, and most of the answers I've read do not make sense to me. 我是编程新手,还是使用Android Studio 0.8.2编程的新手,而且我读过的大多数答案对我来说都没有意义。 Every time I've searched for this answer, I get confused. 每次搜索此答案时,我都会感到困惑。 Trying to use a NEXUS 7 table, I get all the way to running my app with no coding errors indicated, but still the program tells me: 尝试使用NEXUS 7表时,我一直在运行我的应用程序,但未显示任何编码错误,但是程序仍然告诉我:

pkg: /data/local/tmp/com.WorldWonders.ringold.worldwonders Failure [INSTALL_FAILED_OLDER_SDK] pkg:/data/local/tmp/com.WorldWonders.ringold.worldwonders失败[INSTALL_FAILED_OLDER_SDK]

My app/build.gradle is: 我的app / build.gradle是:

apply plugin: 'com.android.application'

android {
compileSdkVersion 20
buildToolsVersion "20.0.0"

defaultConfig {
    applicationId "com.WorldWonders.ringold.worldwonders"
    minSdkVersion 20
    targetSdkVersion 20
    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.google.android.gms:play-services:5.0.77'
compile 'com.android.support:support-v4:21.0.+'

My main activity is: 我的主要活动是:

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingBottom="@dimen/activity_vertical_margin"
tools:context=".main">


<Button
    style="?android:attr/buttonStyleSmall"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="Naples"
    android:id="@+id/btnNap"
    android:onClick="onClick_btnNap"
    android:layout_alignParentTop="true"
    android:layout_alignParentLeft="true"
    android:layout_alignParentStart="true" />

<Button
    style="?android:attr/buttonStyleSmall"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="Gas Lamp SD"
    android:id="@+id/btnGas"
    android:onClick="onClick_btnGas"
    android:layout_above="@+id/map"
    android:layout_centerHorizontal="true" />

<Button
    style="?android:attr/buttonStyleSmall"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="Coloseum"
    android:id="@+id/btnCol"
    android:onClick="onClick_btnCol"
    android:layout_alignParentTop="true"
    android:layout_alignParentRight="true"
    android:layout_alignParentEnd="true" />

<fragment
    android:id="@+id/map"
    android:name="com.google.android.gms.maps.MapFragment"
    android:layout_below="@+id/btnNap"
    android:layout_width="match_parent"
    android:layout_height="match_parent"/>

</RelativeLayout>

My Manifest is: 我的清单是:

<users-sdk
    android:minSdkVersion="20"
    android:targetSdkVersion="20" />

<permission
    android:name="com.WorldWonders.ringold.worldwonders.permission.MAPS_RECEIVE"
    android:protectionLevel="signature"/>
<uses-permission android:name="com.WorldWonders.ringold.worldwonders.MAPS_RECEIVE"/>

<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="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />

<uses-feature
    android:glEsVersion="0x00020000"
    android:required="true" />


<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.maps.v2.API_KEY"
        android:value="AIzaSyBtDVKgy7bBv5Q-x3DDtCVv5CTiEsQFF3o"/>

    <activity
        android:name=".main"
        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>

Every fix I've found on StackOverflow has done me no good, so I'm trying with my own app and perhaps the advice I get will click. 我在StackOverflow上找到的每个修复都对我不利,所以我正在尝试使用自己的应用程序,也许我会得到建议。 Thanks in advance. 提前致谢。

com.android.support:support-v4:21.0.+ has a minimum SDK version of Android L (as version 21 is in preview only) com.android.support:support-v4:21.0.+具有最低版本的Android L SDK(因为版本21仅在预览中)

Switch it to compile 'com.android.support:support-v4:20.+' if you want to support devices not running Android L. 如果要支持未运行Android L的设备,请切换为compile 'com.android.support:support-v4:20.+'

Also note that no phones/tablets run SDK version 20 (that is for Android Wear devices only) so your minSdkVersion should also be some lower version (ie, 14 for ICS+ devices, 16 for Jelly Bean+ devices, etc). 另请注意,没有电话/平板电脑运行SDK版本20(仅适用于Android Wear设备),因此您的minSdkVersion也应为较低版本(例如,ICS +设备为14,Jelly Bean +设备为16,等等)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM