which Android version should I develop for May 2016 - android

I am new to the android development, I was wondering which Android version should I develop for? Some people told me to go with Kitkat 4.4.4, but some told me to go for 6.0 marshallmellow even though it only has little market share. I am also looking to purchase an android phone for development purpose, hopefully won't break my bank, any suggestions, galaxy??

HTC or Moto G 3rd Generation are best for testing purpose because i am also using these.
and apart from this you can build application for marshmallow but set min android version to 15.
enjoy your code time.

As an Android development, I agree with you to buy a new device. It should support Android6.0 better, then you can use it much longer. Below is our company's used version:
compileSdkVersion = 23
buildToolsVersion = "22.0.1"
minSdkVersion = 11
targetSdkVersion = 19
The target sdk version is 19 (Kitkat 4.4.4), while compile is 23, by this then you can use more google's sdk support, such as v7 and v4.
Hope to help you.

The most Stable Version of Android which is enough in your case is 5.1 (API 21) and you can set the minSdkVersion as 11 like you are doing in your current company.
Regarding the Device I recommand you first to Test your app on Debug Mode with a Virtual Emulator, try Genymotion, you will like it, quite fast and Responsive and free for your your personal usage, Then Regarding the device, you can use any device that can support your Targer SDK (19), In case your company gives you a project with Target SDK (23), you can just upgrade the OS Version on your Android Device.
Good luck

Related

Can I trust that my libgdx app for android will work on Sdk version 14?

This is all in the build.gradle for android.
So if I set the minSdkVersion to 13 Android Studio says it's too low, but it seems to be happy if I set it to 14. Is it safe to assume that it will work on sdkVersion 14? Unfortunately I do not have a phone with sdkVersion 14, and I haven't been able to get the emulator working for that version.
My buildToolsVersion is set to 28.0.3
compileSdkVersion is set to 27
targetSdkVersion is set to 27
Also I tried setting up a virtual device of Nexus 4 with API 15 in the android studio AVD manager, but it just has a black screen on the virtual phone and never seems to start up. Anyone had the same problem when trying an emulator with low API ?
As long as you aren't doing any tricky stuff in your Android module, you'll be fine. There are many games released with LibGDX installed on every version of Android. If there were a problem with specific Android versions, it would have turned up in the LibGDX issue tracker.
By tricky stuff, I mean customizing permissions in the manifest, calling Android code by reflection, etc. Things that have behavior changes across different versions of Android. When you target Android SDK 27, all the Android behavior changes in the various versions between minSdkVersion and targetSdkVersion take effect.
OpenGL ES 2.0 is unsupported in old versions of the Android emulator, which is why you get the black screen.

Can I only install the newest Android API to target lower API Version?

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.

What SDK to install, seriously?

I know there are plenty of documents over the internet but I have still some doubts about what SDK to install on my computer to create an android application for nearly %100 devices to working with. Google Play says that if I use API 8 (which is Android 2.2) then my application work nearly all Android devices.
So I downloaded API 8 and API 22 (Android 5.1, was default installed by Android Studio itself) and I don't know if it works or not if I select Minimum SDK to API 8 while creating a new project.
So seriously guys, what the heck is going on?
What SDK Platform(s) you install has little to no impact on what versions of Android you can support.
If you create a new Android Studio project via the new-project wizard, you will find an app/build.gradle file. In there, you will find a setting named compileSdkVersion. This controls what version of the Android SDK you are compiling against (i.e., what JAR is used to satisfy compile-time references to Java classes like Activity and TextView). Whatever value you specify for compileSdkVersion must be an "SDK Platform" that you have installed from the SDK Manager.
In a newly-created project given your setup description from your question, you will see that compileSdkVersion is 22, lining up with pre-established API Level 22 edition of the SDK Platform.
However, this does not mean that your app will only run on API Level 22+ devices. Much of what is in the API Level 22 edition of the Android SDK has existed in previous versions of the SDK.
The minSdkVersion property in the same app/build.gradle file says how old you are willing to go -- what is the lowest API level you are willing to support. Right now, I think a new project will be set up with minSdkVersion of 15, though that varies over time. More importantly, you can change it to be whatever you want, and you do not need the SDK Platform installed for whatever level you choose.
If, in your code, you reference stuff in the Android SDK that is valid for your compileSdkVersion but is newer than the minSdkVersion, the build tools will point out the discrepancy, so you can make sure that you know what you are doing. This is how Android handles progressive enhancement -- you see what version of Android you are running on (Build.VERSION.SDK_INT) and use newer APIs where you can, falling back to older APIs as needed.
TL;DR: So long as your compileSdkVersion has a value for which you have an installed SDK Platform, you're set.
It depends on the application you are developing. And the resources that it will need. It's true that if you use the oldest version (API 8) and your application is simple enough, then it will work on any device.
But there are limitations to it. on older APIs you will not be able to use new features as Navigation drawer for example
I would recommend API 11 or 14, that covers most of the devices and features nowadays.
You should consider the design you want to create on your app
You can see the market share of the different api versions here: https://developer.android.com/about/dashboards/index.html
Then you have a trade-off of how advanced APIs you want to use vs. how many devices you want to support.

How to build Android L app to support lower sdk version devices? [Eclipse]

I have been trying to test my app it works which works fine with 4.4.4 and lower, but when I try to compile it with targetSdkVersion 'L', I am unable to run it on lower version, is there a work around to do achieve this on Eclipse. I am unable to copmile for lower sdk version of Android if I set the targetSdkVersion to 'L'. I have seen some work around using Android Studio but I still don't feel comfortable with the Android Studio.
L is a preview release of the SDK, and you can't use it to build apps that will run on previous, released versions of the Android platform. It's intended for testing your code against the L APIs and L emulator, not for building shipping apps. If you want to run on non-L devices, use a released version of the SDK (API 19 or 20).

What is minSdkVersion for Amazon Android in-app purchase SDK?

Some Amazon docs hint that it is 10, but examples run with 8. So what is the correct/safe/practical answer?
It is the minimum SDK requirement for application, App Developers put this variable to not install this app earlier version of device than min SDK version, it is just a safe check, to not install the app on incompatible devices
According to wikipedia http://en.wikipedia.org/wiki/Kindle_Fire the first Kindle Fire was based on Android 2.3.4 which is based on Android SDK version 10. Therefore there is no benefit to use minSdkVersion lower than 10.
If you use minSdkVersion lower than 10 your app will run on all Kindle Fires because new Android versions can run apps written for older Android versions.
However if you specify min SDK version 10 you can use all APIs that is available in the SDK version 10 but is not available in the Android SDK version 8.

Categories

Resources