./gradlew :app:dependencies fail to show conflict - android-gradle-plugin

I have dependencies issue when running my app in android.
I have the following error :
* What went wrong:
Could not determine the dependencies of task ':react-native-firebase:compileDebugAidl'.
> Failed to notify dependency resolution listener.
> The library com.google.android.gms:play-services-measurement-base is being requested by various other libraries at [[17.2.0,17.2.0]], but resolves to 16.5.0. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies.
> The library com.google.firebase:firebase-iid is being requested by various other libraries at [[20.0.0,20.0.0]], but resolves to 18.0.0. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies.
I am used to resolve theses conflicts. I usually use ./gradlew :app:dependencies to find the faulty package (usually a sub-dependency), go to https://mvnrepository.com/ to find which version match the sub-package, and force to load the correct version.
But not this time, because I have no reference to play-services-measurement-base:16.5.0 or com.google.firebase:firebase-iid:18.0.0 in the dependency tree.
(Btw, the command :app:dependencies works while compile trigger the error above).
All I did is changing :
firebaseVersion = "17.3.3"
to
firebaseVersion = "+"
in android/build.gradle
There is the gradle :app:dependencies results :
https://pastebin.com/6QD10hEs
Do someone can tell me what happen here?
Why gradle :app:dependencies don't show me the correct dependency tree?
thanks

Related

How to print all dependencies in meson?

I checked out a gtk project inside a docker and during meson build found many dependencies are missing eg. libwayland-dev, libxrandr-dev...
Because meson fails at the first missing dependency, I had to redo this over and over to get install the entire list of dependencies that will be looked for using pkg-config. And, in projects with multiple git submodules, this becomes a lengthy process.
Wondering if I'm doing this whole thing wrong or if there is a way to get to the complete list of dependencies.
To get dependencies for your project, from build directory run:
meson introspect --dependencies

Unable to find method 'org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension.macosX64()

I've updated kotlin from 1.3.61 to 1.3.70 in my multiplatform project with android, jvm, ios and macosx64 targets not changing other code and whenever a gradle sync is attempted I get the following message (and the project build fails, of course):
CONFIGURE FAILED in 3s
Unable to find method 'org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension.macosX64()Lorg/jetbrains/kotlin/gradle/plugin/mpp/KotlinNativeTargetWithHostTests;'.
Possible causes for this unexpected error include:
Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.)
Re-download dependencies and sync project (requires network)
The state of a Gradle build process (daemon) may be corrupt. Stopping all Gradle daemons may solve this problem.
Stop Gradle build processes (requires restart)
Your project may be using a third-party plugin which is not compatible with the other plugins in the project or the version of Gradle requested by the project.
I've tried the solutions described above, I also tried to clear .gradle/caches, but nothing changed. What might be the problem?
This happened because I had a buildSrc module where the dependencies' artifact names are declared like this:
object Deps {
object Android {
// artifacts
}
object Native {
// artifacts
}
// ...
}
and I had updated the kotlin dependency there, but I had forgotten to update the kotlin version in the build.gradle.kts of the buildSrc directory itself.

Execution failed for task ':cinteropAFNetworkingIOS'. > Cannot perform cinterop processing for AFNetworking: cannot determine headers location

This error pops up in Xcode after a gradle build
or like the one below in your intelliJ
When you come across an error like this,
This property is used to replace the default Kotlin/Native compiler used by the Gradle plugin with a local distribution. Since this sample is included in the K/N repo, it has this property specified to use a compiler built from sources.
So you may just remove org.jetbrains.kotlin.native.home from your gradle.properties and rerun the build.
And for the error in the second image, you can ignore that because when you try to perform ./gradlew build in the terminal, this is bound to occurs as this is not handled by the gradle in IntelliJ or Android Studio. It will be recognized by the Xcode when you follow the Readme.md(https://github.com/JetBrains/kotlin-native/tree/master/samples/cocoapods) and unlink the "Pods_ios_app.framework" and re-link by browsing again to make it work.

IntelliJ downloads Gradle dependencies but cannot find them during compile

IntelliJ downloaded the dependencies listed in my build.gradle file and they show up in the External Library, but IntelliJ fails to find them during compile. It just throws a bunch of "package x does not exist" and "cannot resolve symbol". Under the Project Structure -> Modules -> Dependencies they all show up and are listed as compile.
If I try to build it with Gradle it's successful, so it's just IntelliJ. Any ideas?
If it's important, I'm using this on a Mac.
Found the answer. IntelliJ was treating Main and Test as modules with no dependency related to the project itself and all of the library dependencies were stored at the project level.
I killed off Main and Test as modules and it sorted itself out.

get oozie-client dependency with Gradle build

I'm trying to build my project using IntelliJ and gradle. I have a dependency on oozie-client jar.
I defined the dependency in gradle as follows:
dependencies {
compile 'com.yahoo.oozie:oozie-core:3.0.0'
}
when I run buildDependency I get the following error:
* What went wrong:
Could not resolve all dependencies for configuration ':compile'.
Could not resolve com.yahoo.oozie:oozie-core:3.0.0.
Required by:
:TestRunnerFramework:1.0
Could not resolve com.yahoo.oozie:oozie-core:3.0.0.
Could not parse POM http://repo1.maven.org/maven2/com/yahoo/oozie/oozie-core/3.0.0/oozie-core-3.0.0.pom
Could not find any version that matches com.yahoo.oozie:oozie-main:3.0.0.
please advice,
This is either an incorrect POM (or incorrect parent POM), or a POM that Gradle fails to interpret correctly (there are a few known limitations around this). Often, the only solution is to edit the POM, for example in your binary artifact repository. If you think the problem is on Gradle's side, you can file an issue over at http://forums.gradle.org.