1

I have this error: Not targeting the latest versions of Android; compatibility modes apply. Consider testing and updating this version. Consult the android.os.Build.VERSION_CODES JavaDoc for details. At line: android:targetSdkVersion="15" />

AndroidManifiest

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

    <uses-sdk
        android:minSdkVersion="8"
        android:targetSdkVersion="15" />
    
    <uses-permission android:name="android.permission.CALL_PHONE" />
    <uses-permission android:name="com.app.permission.MAPS_RECEIVE" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.CAMERA" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    <uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
    <uses-permission android:name="android.permission.ACCESS_GPS" />
    <uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
    <uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" >
    </uses-permission>
    
    <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" >
        <uses-library android:name="com.google.android.maps" />
        
        <activity
            android:name=".ListinActivity"
            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=".Quienes"
            android:label="@string/title_activity_quienes" >
        </activity>
        <activity
            android:name=".Posicionamiento"
            android:label="@string/title_activity_posicionamiento" >
        </activity>
    </application>

</manifest>

project.properties

# This file is automatically generated by Android Tools.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file must be checked in Version Control Systems.
#
# To customize properties used by the Ant build system edit
# "ant.properties", and override values to adapt the script to your
# project structure.
#
# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt

# Project target.
target=android-15
android.library.reference.1=../../android-sdks/extras/google/google_play_services/libproject/google-play-services_lib

how I can solve this?

Thanks

PD:

I have changed

<uses-sdk
            android:minSdkVersion="8"
            android:targetSdkVersion="21" />

but it shows the same error.

Sweta Jain
  • 3,248
  • 6
  • 30
  • 50
wiki
  • 299
  • 4
  • 16

2 Answers2

1

You are targeting an old version of Android SDK (API 15). Update your Android SDK and than change your AndroidManifest.xml:

   <uses-sdk
      android:minSdkVersion="8"
      android:targetSdkVersion="21" />
bonnyz
  • 13,458
  • 5
  • 46
  • 70
  • is the only solution? I have other projects with that version of the SDK and I have this problem. – wiki Jan 10 '15 at 11:03
  • 1
    It's up you. I suggest you to set targetSdkVersion at least at 17 or greater, but if your app works fine with level 15 you can stay at this level (even if it's not recommended) – bonnyz Jan 10 '15 at 11:05
  • I've changed this: and it shows thew same mistake ... what i do now? – wiki Jan 10 '15 at 13:01
1

Change to

<uses-sdk
        android:minSdkVersion="8"
        android:targetSdkVersion="19" />
Wiertek
  • 368
  • 1
  • 8