I've written a first app for Android with Eclipse. I've published it but I'm noticing that on the app page it doesn't show the Android minimum version supported, you can see it here:
https://market.android.com/details?id=com.yellowhouse.everydayquotes
I've searched in the project files and I've found that in project.properties there is the following line:
target=android-15
is that the correct place to set the Android version? Am I missing something? Why does it not appear on the page? Thanks.
the "target=android-15" that you have is for your emulator or your test device which you want to launch your app with
To answer to your question, you need to set the minSDK version in your android manifest file
like that
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="tfe.rma.ciss.be"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk android:minSdkVersion="8" />
</manifest>
To set the minimum required android version for your app, you need to use uses-sdk element inside your AndroidManifest.xml file:
<manifest ...>
<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="7"/>
...
</manifest>
Version 4 means Android 1.6. Read up information on android manifest to see the correct sdk version numbers: http://developer.android.com/guide/topics/manifest/uses-sdk-element.html
Related
i have written an android app with xamarin.android in visual studio and compiled a release build for android 4.1 and higher. testing directly with my devices works without problems.
after building an apk and uploading it in the play store for a beta test, it says: "app not compatible with your devices". i am pretty sure, that my test devices are not the problem. what could it be??
here is my manifest file:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="xxx" android:versionCode="1" android:versionName="1.1" android:installLocation="auto">
<uses-sdk android:minSdkVersion="14" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<application android:label="alone" android:icon="#drawable/Icon"></application>
</manifest>
on developer interface it says 10106 supported devices:
any ideas? thanks for your help...
best regards from germany,
steven
I dont use xamarin , but using studio if your gradle hava a different min sdk it will overwrite whatever os on you manifest , check your gradle file .
when i try to update my alpha release i receive the error that i need to change my apk version. But how can i do that? my android manifest:
<android xmlns:android="http://schemas.android.com/apk/res/android" android:versionName="1.1">
<manifest>
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="23"/>
<application>
<activity android:configChanges="keyboardHidden"
android:name="org.appcelerator.titanium.TiActivity" android:screenOrientation="portrait"/>
<activity android:configChanges="keyboardHidden" android:name="ti.modules.titanium.ui.TiTabActivity"/>
</application>
</manifest>
</android>
Ah, you talk about APK version, not about Android SDK. The solution is simple. You need to change the version at a couple places.
Change the version tag with at least the 3rd number (patch) increased
<version>1.0</version>
Can become
<version>1.0.1</version> or <version>1.1</version>
Next, you also need to change the part in the android manifest
<manifest android:versionCode="1"
android:versionName="1.0.1" package="com.example.app"
xmlns:android="http://schemas.android.com/apk/res/android">
Increase version code every time, can be same as version, in my example 101 for example. Or just a build number (1, 2, 3, etc)
Versionname should be the same as the version in the version tag. Also don't forget to put your app ID in the same code ;)
In TiApp.xml add version code and version name to manifest
<manifest android:versionCode="1" android:versionName="1.0">
Google is mainly complaining about version code so check that and increase by one. These settings will override the version of the app specified in the tag for android
Each APK you submit to Google Play must have a unique, incremental build version, which on Android is android:versionCode.
Titanium will use the <version> tag in tiapp.xml to set the release version which on Android is android:versionName.
To set the build version you need to add/use a <manifest> element under the <android> element in tiapp.xml like this:
<android>
<manifest android:versionCode="1">
..
</manifest>
</android>
The 4.1.0 Sample included a Gruntfile.js to easily increment the iOS and Android build versions. It can even bump the major, minor or patch release version for you.
Please read the blog post on versioning your apps with Titanium 4.1.0 and later for more information.
you also have to increment
<version>1.1</version>
I have a warning when trying to test theme on latest Android SDK Package 4.2.
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.themetest"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="16" />
<application
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppBaseTheme" >
<activity
android:name="com.example.themetest.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>
</application>
</manifest>
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. AndroidManifest.xml /ThemeTest line 7 Android Lint Problem
I am using a custom theme called 'AppBaseTheme'. My question is what exactly Consult the android.os.Build.VERSION_CODES javadoc.. How could I solve this problem?
It says this because of targetSdkVersion="16". API 16 is Jellybean 4.1 and 4.1.1, while Jellybean 4.2 is API 17.
Try using:
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="17" />
Also, keep in mind that this is a Lint warning. These warning exist to help you better your code and make it easy to maintain, while being compatible with the latest Android changes. Ignoring this will not cause you any immediate problems.
EDIT: With Android 4.3, the latest SDK version is now 18, so you should use:
...
android:targetSdkVersion="18" />
EDIT 2: With Android 4.4, the latest SDK version is now 19, so you should use:
...
android:targetSdkVersion="19" />
EDIT 3: With Android L, you must use the following values, as described here:
compileSdkVersion="android-L"
minSdkVersion="L"
targetSdkVersion="L"
EDIT 4: With Android L's public release, you must use 21 instead:
...
android:targetSdkVersion="21" />
20 was used for 4.4W, or for Android Wear.
EDIT 5: With Android M's public release, you must use 23 instead:
...
android:targetSdkVersion="23" />
In the future please consult the official Android documentation to keep yourself up-to-date with the latest Android API Levels.
You should not use android:maxSdkVersion="17" because it means that if someone using your app updates its android OS to a version greater than 17, your app will be removed.
This lint message is telling you that compatibility mode will be automatically applied to any features you may have used that are not available in later versions than your declared targetSdkVersion of 16 (and, it is also telling you that there are such later versions - e.g., 17).
These automatic compatibility mode adjustments may not be as ideal as what you could accomplish yourself by using whatever features were added in later (than level 16) versions to replace the functionality of the level 16 ones that you may have used, which have been removed in later versions (if any). But everything should still continue to work in later versions (due to the adjustments made by the compatibility code that is automatically applied for running on versions higher than your declared targetSdkVersion's API level); it just may not work as well as your own custom detection of, and use of, the new features (when your app detects that it is running in the later versions that have those features) would have worked.
Here is a discussion, with examples, of minSdkLevel vs. targetSdkLevel:
Android Min SDK Version vs. Target SDK Version
Another thing you will want to consider is the relationship of the Project Build Target (the level of the SDK used to compile your app) to the targetSdkLevel:
Difference between "Build Target SDK" in Eclipse and android:targetSdkVersion in AndroidManifest.xml?
Always go with the latest android version as your target SDK to get more benefits.
Targeting a recent API level also allows your app to take advantage of the platform's latest features to delight your users. Furthermore, as of Android 10 (API level 29), users see a warning when starting an app for the first time if the app targets Android 5.1 (API level 22) or lower.
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="29" />
Please refer to this developer site for more details.
https://developer.android.com/distribute/best-practices/develop/target-sdk
Its a warning message if you want to solve it then you can set android:maxSdkVersion="17" but you have to take care of the fact that if someone currently using your app and upgrade his android OS to greater version than 17 then your app will automatically remove because of unsupported version.. So take care of this fact also..
Add xmlns:tools="http://schemas.android.com/tools" tools:ignore="OldTargetApi".
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.themetest"
android:versionCode="1"
android:versionName="1.0" xmlns:tools="http://schemas.android.com/tools" tools:ignore="OldTargetApi">
<uses-sdk
android:minSdkVersion="8"
android:targetSdkVersion="16" />
From: Stuck on why my android app wont work?
I have developed and Simple android application in Java and also uploaded it on play.google.com. I uploaded successfully and also published well and I made all steps to published and save the app.after publishing it is showing on app store.Problem is that when I searched the app on my android device then it give the error of "This item is not compatible with your device". I don't understand why this error is being occurred. Kindly any one tell me how can I make and android app which is compatible with all versions of android or any other method through which my app should sun on all android devices.
Here is my manifest file code:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="sml.sml.pkg"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="15" />
<application
android:icon="#drawable/ic_launcher"
android:label="#string/app_name" >
<activity
android:name=".SMLActivity"
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>
There are a number of reasons why this might occur. Most likely you are either:
Not specifying the correct minimum SDK your application is compatible with. To do this, you should add to your AndroidManifest.xml the following.
<uses-sdk android:minSdkVersion="#" />
where the # should be replaced with the integer corresponding to the minimum SDK number your application supports. For example, if your application has features that are supported by Gingerbread (API 10) but not Froyo (API 8), then you should specify the number to be 10. Note that you rarely want to add the android:maxSdkVersion attribute, as this will prevent devices from using your application when new SDK versions are released.
Your application uses a feature that is not supported by your device. This might be the case if you have declared in your manifest the <uses-feature> tag.
Edit:
I just saw the code you added to your original post. Your code, specifically, <uses-sdk android:minSdkVersion="15" />, will prevent Android devices running Android versions lower than 15 from using your device. To allow older versions to use your application, you'll need to lower this number. Make sure you are 100% certain that the SDK you choose supports 100% of the features that your application requires.
you need to provide android:minSdkVersion & android:maxSdkVersion in AndroidManifest.xml.
i think your mobile version is not supported to the version you implemented in your project. So, in Androidmanifest file just follow the following changes as shown......
Androidmanifest.xml
<uses-sdk android:minSdkVersion="7" android:maxSdkVersion="11"/>
provide those versions based on your mobile version also. if you are using android 2.2 means its API level is 8. so provide minSdkVersion as 8.
Below is a manifest of one of my library projects. Currently I increase the versionCode and versionName with every change. Is that required?
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
android:installLocation="preferExternal"
android:versionCode="14"
android:versionName="1.1.7"
package="com.tubala.android" >
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-sdk
android:minSdkVersion="7"
android:targetSdkVersion="11" />
</manifest>
Thanks in advance.
Currently AndroidManifest.xml of Android Library is completely ignored when building application that uses this library. The only thing that is used by aapt tool is package attribute (to generate R class into correct package).
This might be changed in next releases. But I'd say you should keep your versioning anyway. This is a good practice (even if build tools are ignoring it).
android:versionName attribute is not necessary. It's just a version users see when they open your application information in the application manager.
android:versionCode is more important. You must increase it every time you publish your application on the Android Market.