Reputation: 1319
I am getting this warning in my Android app manifest file. I have tried everything, but this just doesn't go away. I am trying to use Accelerometer and Magnetometer in my ap and added the additional permissions Here is my manifest file:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.msapp2"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="18"
android:targetSdkVersion="18" />
<!-- need for streaming video + about page -->
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
<!-- need for reminder add/delete -->
<uses-permission android:name="android.permission.READ_CALENDAR" />
<uses-permission android:name="android.permission.WRITE_CALENDAR" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_mainicon"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="com.example.msapp2.MainActivity"
android:label="@string/app_name"
android:configChanges="orientation|screenSize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".WorkoutBuddy"
android:label="exercise"
android:configChanges="orientation|screenSize">
<intent-filter>
<action android:name="android.intent.action.exercise" />
<category android:name="android.intent.category.DEFAULT" />
</intent-filter>
</activity>
</application>
</manifest>
Upvotes: 1
Views: 274
Reputation: 3194
Try using:
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="19" />
The docs are a little fuzzy, but what they say is that the target SDK version is used to determine if android should enable compatibility layers. for example, If your min SDK was 8, but your target SDK was 19, you are telling android that while there's no reason it shouldn't work on version 8, you've only tested on 19. Therefore, if there any compatibility settings to enable between level 8 and 19, they can be set. note that this attribute may actually do nothing depending on the actual min / target values.
If you set min SDK == target, you are essentially saying you have tested on the lowest API level you claim to support, which is a good thing.
Upvotes: 0
Reputation: 29672
You have written latest version as android:targetSdkVersion="18"
( Android 4.3 ) in your manifest.xml file, But I assume you have latest version in your SDK, probably 19
the version.
Since it is just a Warning, so you can ignore if you are not targeting your application to Kitkat
version ( 4.4.2 ).
Otherwise solution is to change it to android:targetSdkVersion="19"
Upvotes: 2