How can I know which Android API level I am using. I need to make sure I am using version 1.1.0.
Edit:
My bad. I need level 14.
Thank you.
Build.VERSION.RELEASE will give you the version number as a String, such as 1.5
How can I know which Android API level I am using
I do not know what you mean by "using".
You can determine the API Level of the device that you are running on via Build.VERSION.SDK_INT.
I need to make sure I am using version 1.1.0
There was never a "1.1.0" release of Android. Android 1.1 did not have a ".0" suffix. Android 1.1 was released in early 2009 and is used on approximately zero devices today.
<uses-sdk android:minSdkVersion="14" /> in your AndroidManifest.xml
In general you're also interested in the compileSdkVersion of the project, which you can see in your build.gradle file.
Related
Say I wanna make an app with :
android:minSdkVersion="8"
android:targetSdkVersion="22"
My questions :
Do I need to install both "min SDK Version" as well as the target SDK version?
How if I only have SDK Version of 23 only? Can I make such setting? Or do I need to have both 22 as well as 8?
Can I debug such app with API / SDK Ver 21 phone?
Is it enough to only have the latest SDK version to develop any kind of app?
It is okay if there's any source (link) to comprehensive rule about such ruling, since I didn't found it even after extensive searching.
P.S. I don't know if this info is needed, but the app I wanna make is a libgdx game app.
Thanks
No. (the other answer is wrong)
You only need to have the version that you building with (compileSdkVersion in build.gradle). If you only have 23, then build with 23.
Usually, you should target the same version you build with. However, libgdx is not always fully tested with the latest Android. Check here under Android build version to see what it has been tested for. This is the SDK level you should should target if you want to be sure not to have any problems. Right now, it is version 20 of Android.
I have been targeting Android 22 without issue (that I know of), though. I haven't yet released something higher than 20 yet so no guarantees that it's perfectly safe.
Yes.
Yes. Generally, the target SDK version and the build SDK version should match, but it works if you target a lower version than you're building with.
Targeting a later API basically changes some default behavior of apps. Theoretically, you should be testing on devices spanning the full range of API levels that you support, but in practice this is unnecessary for a libgdx game. But if you target a version that's too old, you might miss out on some newer features. For example, if you target <19, immersive mode (which is desirable for most games) cannot be supported.
Yes you need to install
If you have SDK Version of 23 only but you want to build it in version 22 then also you need to install vesrsion 22 SDK.
Yes you can easily debug such app with API / SDK Ver 21 phone.
I think its enough.
I am very interested in this framework: https://github.com/ragunathjawahar/android-saripaar
Unfortunately in the manifest.xml it says
<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="15" />
Can I still use this with Android 2.3? I'm curious, because I do know there is a android v4 support library out there and I was wondering if that would help?
Well, API Level 9 is Android 2.3 - 2.3.2, also known as Gingerbread.
The android:minSdkVersion is 4, also known as Donut (1.6). So yes you can use it.
For all Codenames, Tags, and Build Numbers, check here
The minimum is 4 so as long as the SDK is above version 4 you can use it. So yes.
Yes. The android:minSdkVersion="4" says it's compatible with any version above API level 4 so you can use it since android 2.3 is API level 9
It does say minSDKverion 4, which is Donut (1.6), so why shouldn't you?
You can check the versions that correspond to the sdk numbers and their usage stats from here.
I set up my project to use Android 3.2 (API Level 12), but it seems like a lot of phones are still using Android 2.2 (API Level 8).
Is there a way to change my project from only supporting Android 3.2+ to supporting back to Android 2.2?
yes...just change the minsdk number in the manifest. You have to be sure that you don't use any feature that is not supported though...
in your AndroidManifest.xml add this line:
<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="16" />
android:minSdkVersion tells the Store what the minimum version you are targeting is. In this case 2.2. Devices less than 2.2 won't be able to download your app.
android:targetSdkVersion tells the store what the best version you are developing for is. In this case 4.1. Devices over 4.1 can still download your app but certain features may run in compatibility mode.
NOTE: When you setup your project to use 3.2, all you did was select the Android SDK you wanted your IDE to use when checking and compiling your code. Without the uses-sdk line in your manifest you've targeted nothing.
Right Click Project -> Properties -> Android -> Select SDK version
Update Manifest, min/target api. (as others have described by others).
Go to your Manifest.xml file and edit the minSdkVersion to 4. That will set it way back to 1.5 or something like that :). You can make that number higher if you want to suit a higher API, but I like compatibility.
I've just started developing android apps and I am wondering about this right from the start.
Apparently it doesn't matter if you work with API 13 (3.2), you can still support Android 1.6. Is that true?
For AdMob to work, I had to start working with API 13 and have set
target=android-13
Someone please clarify this or point me somewhere to read it.
Apparently it doesn't matter if you work with API 13 (3.2), you can still support Android 1.6. Is that true?
That depends on what you mean by "work with API 13".
Having a build target of API Level 13, as you mention later in your question, simply means that is the version of the Android SDK you are compiling against. You will be able to reference classes and methods that exist on API Level 13 (and earlier). Your app can still run on any version of Android you want.
However:
You cannot call methods that do not exist in API Level 13 when you are not running on an API Level 13 device (and likewise for API Level 12, 11, 10, etc.).
If you wish to support Android 1.x, you cannot even reference classes or methods that do not exist on the device from a class that gets loaded by the VM.
In either of those cases, you will get a VerifyError, and your app will go "boom".
There are strategies for conditionally using newer-API stuff that allow you to avoid trying to use that stuff on older-API devices. Or, just stick to older-API stuff in the first place, even though you won't get compiler assistance to let you know when you are accidentally using newer-API stuff, given that you are using the newer build target.
Or, contact AdMob support and figure out why they need that build target.
In your Manifest file you can put the min sdk version you want to support and your target sdk version, they could be different, to support 1.6 specify android:minSdkVersion="4" as follows
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="13" />
I had made an application with target : Android 2.1 - API Level7. It works fine with the emulator with target : Android 2.1 - API level7. And after that i tried to run the same app in an emulator with target : Android 1.5 - API Level3. But it is not working. I am using the Eclipse to built my application..
Can anyone say why it happens like this? Or, can anyone simply describe how to make changes to run an app build in API Level7 to 5 with steps.. I am new to this environment, i may be wrong with my procedures..
So plz guide me..
Use the min sdk version in your manifest file to Android 1.5 api level 3. Your api target version is still the same.
Add the following line in your AndroidManifest.xml file
<uses-sdk android:minSdkVersion="3" />
this will allow your app to run in any device with api level 1.5 or higher.
Set the minSDK to the lowest level you want to support, and the max to the highest level. The set the target to whichever makes sense.
In summary, look at this: http://developer.android.com/guide/topics/manifest/uses-sdk-element.html.
You choose the min, target and max SDK in the manifest file.
android is backwards compatible, not forwards, so your target api should be the lowest version of android ynu would like your app to run on. your target api should be 1.5.
Yes as everyone said. Android minimum-sdk-version is trick for you question.
If you have target API 2.3.3 then minimum-sdk-version will be 10(By default).so it will run on 2.3.3, 3.1,3.3 and more which has minimum-sdk-version more than 10.
So if i change minimum-sdk-version to 4 it will work on device which have version more than 4.
No you have two solution --
1) change minimum-sdk-version in android-manifest
2) change target api
project->rightclick->properties->android then select Target API