androidbasic4android

Android-support-v4 library doesn't have JobIntentService in B4A


I have a library and it depends on Android-support-v4 (The JobIntentService class). I'm going to use it in Basic4Android.

There are two ways of adding supprt-v4 dependency to project:

dependsOn>support-annotations</dependsOn>
<dependsOn>support-compat</dependsOn>
<dependsOn>support-v4</dependsOn>
<dependsOn>support-core-ui</dependsOn>
<dependsOn>support-core-utils</dependsOn>
<dependsOn>support-fragment</dependsOn>
<dependsOn>support-media-compat</dependsOn>

to that xml.

If I use the first way, I can't find JobIntentService. If I use the second way it's fine, but It will have a conflict with the AppCompat library.

So how an I have a complete code of support-v4 without experiencing conflicts?

I know that JobIntentService exists in support-compat part of android-support-v4, but adding it beside com.android.support:support-v4 still causes duplications.


Solution

  • Since the first way uses Maven artifacts to get your library from Jcenter, it might download an old version that does not include this class in it's class path.

    To resolve this clear libraries of B4A placed in the sdk m2repository folder named b4a_remote, delete it and let the B4A redownload the files. Therefore it will download fresh and updated libraries that contain this class.