How to change the minSDK Version in eclipse? - android

While creating a new android project in eclipse 3.5, i have selected Android 2.1 Update1 as build target. But i forgot to give the mini SDK version. Now when the build the project, its giving a warning message "WARNING: Application does not specify an API level requirement!Device API version is 8 (Android 2.2)"
The application is running fine..but when i run that application is my Samsung Galaxy S which is having android 2.1, the application is behaving differently.
I have even tried adding
<uses-sdk minSdkVersion="7" /> in the manifest file..But still i am getting the warning message..
So how can i change the mini SDK of my project in eclipse to 7,so that i get the same result in my emulator and Mobile phone?
Thanks in advance
Shijilal

In your manifest there should be something like this
<uses-sdk android:minSdkVersion="int" />
Now just change the number to the desired version number. Additionally you should also change the value of the target in the default.properties file.

Related

Run android 4.2.2 build target application in android 4.4.2

I'm currently developing an android application. in manifest i have put the minSkdVersion and targetSdk version as follows.
<uses-sdk
android:minSdkVersion="14"
android:targetSdkVersion="17" />
when i'm trying to run the application in android 4.4.2 nexus 4 phone it shown unknown target in select device dialog screen as following
is it not possible to run on android higher version with less api build target.
It is possible to run your app on a device with API version less than the build version. The minimum API you can run on is decided by android:minSdkVersion attribute.
You have a problem with connecting your device properly. Please note that it is listed as offline. The device status/unavailability has nothing to do with your code.

How do I set my Eclipse to compile for Android 2.3

This is probably very basic but I have failed to find information on how to do this. On iOS I have a base SDK and a target SDK so I can use the latest features from the base SDK (of course check if they are available first) and at the same time make my app run on devices with the target SDK. How can I do the same thing with Android in Eclipse, how can I compile with Android 4.1 and at the same time make my app run on (deploy to) Android 2.3?
Im not asking about checking which version I am running at run time, but how do I configure Eclipse correctly.
Thank you
Søren
Start by reading backward compability on Android developer site. You are probably looking for "Set Minimum and Target API levels".
On your Androidmanifest.xml check for the uses-sdk tag
<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="16" />
version 8 is Android 2.2 up to 16 for 4.1/4.1.1
from here

Android application built in eclipse for 2.3 will it work in 2.2?

I've built an Android application in eclipse. Before starting the project I selected the 2.3.3 api. The code is very basic.
A friend of mine asked to have a copy, but he's using 2.2, do I have to rebuild the project in 2.2 or will it work just fine if I send him the APK build with the 2.3.3 api?
change
<uses-sdk android:minSdkVersion=.... />
in the android manifest to
<uses-sdk android:minSdkVersion="8" />
Change the Project Build Target to 2.2, in the Properties Menu of your project in the Android drill down.
You should only get errors if you used methods that were introduced with the level 10 API (Android 2.3.3). Since you pointed out that your application is very basic, I highly doubt you'll run into major problems.
From the docs
Selecting a platform version and API Level
When you are developing your application, you will need to choose the platform version against which you will compile the application. In general, you should compile your application against the lowest possible version of the platform that your application can support.
You can determine the lowest possible platform version by compiling the application against successively lower build targets. After you determine the lowest version, you should create an AVD using the corresponding platform version (and API Level) and fully test your application. Make sure to declare a android:minSdkVersion attribute in the application's manifest and set its value to the API Level of the platform version.
So in short, you'll have to recompile it
If you go to the properties for your project and then select the Android dialog, you can change the API which your project is using. Provided you have have it installed.
In the AndroidManifest file set android:minSdkVersion to 7. In this way you force it to run in compatibility mode on devices that have lower version than the target mode(which is 8 in your case).

android Admob configChanges

I'm using Admobsdk 4.3.1. When I built the program for android 2.3 it was working but I got an error message instead of the ads, requesting the following
ConfigChanges = keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize.
In order to compile I was forced to change target build from 2.3 to 3.2. I have also changed the minSdk to 2.3 and the program works on gingerbread like this. However I figure on a device using 2.3 it will be impossible to receive any ads.
So now I would like to switch to an older version of the admob jar. Does anyone know if this will work and where can I find an older version? On admob site there is only the latest one.
Thanks in advance.
Matt
AdMob SDK 4.3.1 requires the following config changes, and the following config changes require you to change the build target to 3.2 or higher. You can still use AdMob on any emulators or devices down to Android 1.5 by specifying:
<uses-sdk android:minSdkVersion="3" />
If your app only runs on Android 2.3 or higher, you would set minSdkVersion to 9. Note that the build target is only the version of Android used to compile your app. AdMob will run on lower versions of Android, just test to make sure that your app works fine on these lower versions as well.
Please see this blog post for more information about using 4.3.1.

What happens if we use/install 2.3 build in 2.2 device

I am working on application which should go into android 2.2(Froyo) and android 2.3(GingerBread) devices.
I have built application with android 2.3 SDK , and Installed the same application in 2.2(Froyo) and 2.3 (Ginger Bread) devices.
In both the devices application installed successfully and it is working properly.
I want to know if we install the higher version build into lower version devices is there any chances to face problems.
Till now I didn't found any issue with this.
I didn't used the MIN:SDK version field in the Manifest file.
If you want only users from version 2.2 and up to download your app, just make sure your minimum SDK version is 2.2 by putting this line in your AndroidManifest.xml:
<uses-sdk android:minSdkVersion="8" />
If you want an upper bound limit as well, you can add:
android:maxSdkVersion="10"
So users with Android SDK version 2.2 up to 2.3.3 will be able to install your app.
Regarding problems: If you're using a specific SDK API then just make sure to add an if clause around it to make sure you're on the right version. The best thing to do is change the target to 2.2 just to see if you have any compilation errors... Then you'd know what to change.
Then just fix the problems, change back to 2.3 and build.
If you don't specify the minimum sdk attribute in the manifest file users with 2.2 won't see your application on the market. It specifies that your application supports 2.2 so that users can see the app on the market.
Make sure any functionality that you use from 2.3 has an alternative functionality so that 2.2 users have the ability to actually use your application.
yes , u can find problem ,
try to install that app on android 1.6
it's about API version , there will be some APIs in your app doesn't supported in a lower API version

Categories

Resources