S
S
Sergey Shilovsky2018-11-13 15:48:15
Android
Sergey Shilovsky, 2018-11-13 15:48:15

Which support library to use?

Looking at your imports, I was wondering if it's okay to use libraries that support different versions?
For example, I have the following imports:

import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;
import android.support.v7.app.AppCompatActivity;

Obviously, the application will not work on APIs younger than 7 and the v7 library should be used everywhere, but it does not have the FragmentManager and FragmentTransaction classes. And if you do not use the support library, then the minimum API rises to 11. You can’t lower it either, there is no AppCompatActivity in v4.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Denis Zagaevsky, 2018-11-13
@First_Spectr

v4, v7, and so on (there are also v11, v13, for example) are not versions of the library. Historically, this was the minimum version of the API on which features from this library are supported. At the moment, these naming conventions are just legacy, you can ignore them at all, the minimum supported api is 14 everywhere.
More details .
The answer to the question which version to use is the latest . At the moment it is 28.0.0.
PS
API below 16 can no longer be considered, in fact. There is a tiny percentage of users.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question