Symbol from transitive dependency is not found

Hi experts,

I have a library “A”, which depends on another library “B”. “A” is stored in local maven and “B” is on jcenter.

The dependency is like: My App --> A --> B.

In my app, I want to import symbols that defined in B, but the compilation failed in the “compileDebugJavaWithJavac” task, reporting that symbols are not found in “import …” statement.

---- details -----

In build.gradle of my App, I only declare “A” as my “api” dependency and want to invisibly pull in “B”. It seems not working. Is it expected?

In my build.gradle:

dependencies {
    api 'Library-A:1.0.1'
    // api 'Library-B:2.0.0'  // if I uncomment this one, things work.
}

In gradle dependencies, I can see dependency tree like

debugCompileClasspath - Resolved configuration for compilation for variant: debug
+--- Library-A:1.0.1
|    \--- Library-B:2.0.0
+--- Library-A:{strictly 1.0.1} -> 1.0.1 (c)
\--- Library-B:{2.0.0} -> 2.0.0 (c)

But in gradle androidDependencies, I cannot see Library-B. I don’t know what’s the difference between “dependencies” and “androidDependencies”.

Could you please give any clues? I already searched on Google and SO for a day and didn’t find useful information.

The problem is solved!

I just noticed that the POM file of Library A is not correct. In its POM, Library B is defined as a dependency with type “pom”. It should be “jar”.