The solution from trocchietto is the right one. Remember that you are using "CordovaLib" no "Library", which you just need to change as follows.
// Instead, simply use the following to take advantage of // variant-aware dependency resolution. You can learn more about // the 'implementation' configuration in the section about // new dependency configurations. implementation project(':CordovaLib')
However, the magic application is not required for me, and I will comment on it.
My addictions
dependencies { // This is the old method and no longer works for local // compile fileTree(dir: 'libs', include: '*.jar') // SUB-PROJECT DEPENDENCIES START // debugCompile(project(path: "CordovaLib", configuration: "debug")) //releaseCompile(project(path: "CordovaLib", configuration: "release")) // SUB-PROJECT DEPENDENCIES END // Instead, simply use the following to take advantage of // variant-aware dependency resolution. You can learn more about // the 'implementation' configuration in the section about // new dependency configurations. implementation project(':CordovaLib') // You can, however, keep using variant-specific configurations when // targeting external dependencies. The following line adds 'app-magic' // as a dependency to only the "debug" version of your module. //debugImplementation 'com.example.android:app-magic:12.3' }
source share