iPaulPro / aFileChooser

[DEPRECATED] Android library that provides a file explorer to let users select files on external storage.
Apache License 2.0
1.79k stars 850 forks source link

Changed target build SDK to API level 11. #7

Closed ashughes closed 11 years ago

ashughes commented 11 years ago

API level 11 is the lowest SDK this library project can build against.

ruiaraujo commented 11 years ago

One should target as high as possible. There is no need in targeting a lower version.

ashughes commented 11 years ago

No, you should target the lowest possible version so you avoid using APIs that aren't available in older versions. If newer APIs are desired, then the target API should be increased and those features should be wrapped in API level checks for compatibility (and optionally provide backwards compatible functionality).

ashughes commented 11 years ago

From http://developer.android.com/guide/topics/manifest/uses-sdk-element.html#considerations under 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.

ruiaraujo commented 11 years ago

That's outdated, check the Android Developers Relations team for that.

There are now Lint checks that check if you are using something that is not supported.

ashughes commented 11 years ago

Well if that's no longer recommended I'd love to see who/where it says that. It would be nice if they updated the developer site. :)

You are totally right about the Lint checks (which are really nice and helpful), although not everyone checks Lint to see them (I don't remember if they're Lint warnings or errors).

ruiaraujo commented 11 years ago

I am busy right but I will look it up, I think Reto Meier has said it in his videos. Those Lint checks are automatic in the last ADT version and show up as errors.

sevar83 commented 11 years ago

The target must be as high as possible. The proof is that when you create empty project, the default target is the maximal SDK version installed. In my case it's 17.