decrease the Android API level during app update - android

I have an Android app already published on Google Play and my manifest.xml has these fields declared:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="xxxxxx"
android:versionCode="4"
android:versionName="1.3" >
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="18"
/>
In this version I'm using a specific library to do something that can works only to 18 API version.
The problem is: I added new features to my app and I want update it on google market but I want to exclude API 19, so I modified my manifest.xml in this way:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="xxxxxx"
android:versionCode="5"
android:versionName="1.4" >
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="18"
android:maxSdkVersion="18"/>
I uploaded my app but I have some errors like:
Can not publish the configuration for the following reasons: A device
that are upgrading from levels in the range of 14-18 API to API levels
in the range of 19 + can not be downgraded from version 5 to version
4. The error occurs in the following cases: Trace output with a more of the following: [ALPHA] and Layout screen with a more of the
following: [small, normal, large, xlarge] and Functions with all of
the following: [android.hardware.screen.PORTRAIT,
android.hardware.TELEPHONY, android.hardware.TOUCHSCREEN]. Some
devices are suitable for running multiple APK. In this scenario, the
device will receive the APK with the highest version number.
Any solutions?
Thank you.
Marco

Related

App in Google Play Store (Beta-Test) says "App not compatible with your devices"

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 .

Different Minimum API level in Android Manifest and in Google Developer Publish console

Why is that on my application, the minimum Android API level should be 11 but google play (google published console) says that my minimum is 7?
My Android Manifest:
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.toksis.pvscreen"
android:versionCode="2"
android:versionName=".1001" >
<uses-sdk
android:minSdkVersion="11"
android:targetSdkVersion="19" />
.......I had removed the other parts of the manifest.....

Not targeting the latest versions of Android

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?

android version compatibilty

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.

How to set Android version in Eclipse?

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

Categories

Resources