Difference between android.content and android.support.v4.content

Asked

Viewed 81 times

1

When I use Fragments or Asynctaskloader, two options for the same element appear: android.content and android.support.v4.content

What’s the difference between the two?

inserir a descrição da imagem aqui

These are my project settings:

minSdkVersion 15
targetSdkVersion 23

1 answer

1


android content. refers to a namespace existing in the Android SDK whose version of the API is that indicated in compileSdkVersion.

android.support.v4.content refers to a namespace existing in the library support-v4.
It is included in the project when it uses, in the build.Gradle, compile 'com.android.support:support-v4:25.4.0'

Support libraries are intended to provide classes and methods that exist in the latest versions of the SDK so that they can be used on devices with older versions of the SDK where those classes and methods did not exist.

The reason more than one option appears to you is because the same class exists in both namespace.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.