How to find android dependencies from all flutter plugins - flutter

I am trying to implement flutter plugin in_app_review in one of my flutter project but i am getting duplicate dependency error.
I think some of the plugin from my project is somewhere adding play core dependency which is causing this issue.
Please help me figure out the solution.
I am getting this error log.
Execution failed for task ':app:checkUatDebugDuplicateClasses'.
A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable
Duplicate class com.google.android.play.core.common.IntentSenderForResultStarter found in modules jetified-core-1.8.0-runtime (com.google.android.play:core:1.8.0) and jetified-core-common-2.0.2-runtime (com.google.android.play:core-common:2.0.2)
Duplicate class com.google.android.play.core.common.LocalTestingException found in modules jetified-core-1.8.0-runtime (com.google.android.play:core:1.8.0) and jetified-core-common-2.0.2-runtime (com.google.android.play:core-common:2.0.2)
Duplicate class com.google.android.play.core.common.PlayCoreDialogWrapperActivity found in modules jetified-core-1.8.0-runtime (com.google.android.play:core:1.8.0) and jetified-core-common-2.0.2-runtime (com.google.android.play:core-common:2.0.2)
Duplicate class com.google.android.play.core.listener.StateUpdatedListener found in modules jetified-core-1.8.0-runtime (com.google.android.play:core:1.8.0) and jetified-core-common-2.0.2-runtime (com.google.android.play:core-common:2.0.2)
Duplicate class com.google.android.play.core.review.ReviewInfo found in modules jetified-core-1.8.0-runtime (com.google.android.play:core:1.8.0) and jetified-review-2.0.1-runtime (com.google.android.play:review:2.0.1)
Duplicate class com.google.android.play.core.review.ReviewManager found in modules jetified-core-1.8.0-runtime (com.google.android.play:core:1.8.0) and jetified-review-2.0.1-runtime (com.google.android.play:review:2.0.1)
Duplicate class com.google.android.play.core.review.ReviewManagerFactory found in modules jetified-core-1.8.0-runtime (com.google.android.play:core:1.8.0) and jetified-review-2.0.1-runtime (com.google.android.play:review:2.0.1)
Duplicate class com.google.android.play.core.review.testing.FakeReviewManager found in modules jetified-core-1.8.0-runtime (com.google.android.play:core:1.8.0) and jetified-review-2.0.1-runtime (com.google.android.play:review:2.0.1)

it was happening because i was using
implementation 'com.google.android.play:core:1.10.3'
implementation 'com.google.android.play:core-ktx:1.8.1'
These two dependencies are in my android folder for in-app update and I thought om.google.android.play:core:1.10.3 is responsible for the duplicate dependency issue so when I commented that out it was still giving duplicate dependency issue as com.google.android.play:core-ktx:1.8.1 is also the same so I check on developer guide page where this dependency is now separated according to feature from core dependency then I removed this two dependencies and added implementation 'com.google.android.play:app-update-ktx:2.0.1' this one as I was doing the in-app update as well.
which helped me fix my problem.

Related

Duplicate class com.google.android.gms.common.util.VisibleForTesting

Duplicate class com.google.android.gms.common.util.VisibleForTesting
found in modules classes.jar
(com.google.android.gms:play-services-basement:17.0.0) and
libGoogleAnalyticsServices.jar (libGoogleAnalyticsServices.jar)
Go to the documentation to learn how to Fix dependency resolution errors.
Go to gradle project file then update it to :
classpath 'com.google.gms:google-services:4.3.3'
Or go to 'Refactor' menu then click on 'Migrate to AndroidX'

Unity Gradle Build failed while trying to build project as an APK (2019)

I have a really big problem. I wasted many hours with trying to build a little game i made as an APK. I switched the build platform to android, installed the JDK, NDK and SDK tools and it should work. But at the moment when unity is "Building Gradle Prject" an error is poping up: 1 exception was raised by workers: See the console for details.
And then there are 60 Errors in the console.
I already tried to reinstall JDK, the Android Studio, the apk tools in the Unity Hub and i also reinstalled Unity itself (completely).
So, here is the most important Error:
CommandInvokationFailure: Gradle build failed.
D:/Unity/2019.2.3f1/Editor/Data/PlaybackEngines/AndroidPlayer/Tools\OpenJDK\Windows\bin\java.exe -classpath "D:\Unity\2019.2.3f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-5.1.1.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "assembleRelease"
stderr[
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':checkReleaseDuplicateClasses'.
1 exception was raised by workers:
java.lang.RuntimeException: java.lang.RuntimeException: Duplicate class com.unity3d.ads.BuildConfig found in modules classes.jar (:UnityAds:) and classes.jar (:unity-ads:)
Duplicate class com.unity3d.ads.IUnityAdsListener found in modules classes.jar (:UnityAds:) and classes.jar (:unity-ads:)
Duplicate class com.unity3d.ads.UnityAds found in modules classes.jar (:UnityAds:) and classes.jar (:unity-ads:)
Duplicate class com.unity3d.ads.UnityAds$FinishState found in modules classes.jar (:UnityAds:) and classes.jar (:unity-ads:)
Duplicate class com.unity3d.ads.UnityAds$PlacementState found in modules classes.jar (:UnityAds:) and classes.jar (:unity-ads:)
Duplicate class com.unity3d.ads.UnityAds$UnityAdsError found in modules classes.jar (:UnityAds:) and classes.jar (:unity-ads:)
Duplicate class com.unity3d.ads.mediation.IUnityAdsExtendedListener found in modules classes.jar (:UnityAds:) and classes.jar (:unity-ads:)
Duplicate class com.unity3d.ads.metadata.InAppPurchaseMetaData found in modules classes.jar (:UnityAds:) and classes.jar (:unity-ads:)
Duplicate class com.unity3d.ads.metadata.MediationMetaData found in modules classes.jar (:UnityAds:) and classes.jar (:unity-ads:)
Duplicate class com.unity3d.ads.metadata.MetaData found in modules classes.jar (:UnityAds:) and classes.jar (:unity-ads:)
Duplicate class com.unity3d.ads.metadata.PlayerMetaData found in modules classes.jar (:UnityAds:) and classes.jar (:unity-ads:)
Go to the documentation to learn how to Fix dependency resolution errors.
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
BUILD FAILED in 14s
]
stdout[
Task :preBuild UP-TO-DATE
Task :preReleaseBuild UP-TO-DATE
Task :compileReleaseAidl NO-SOURCE
Task :compileReleaseRenderscript NO-SOURCE
Task :checkReleaseManifest UP-TO-DATE
Task :generateReleaseBuildConfig UP-TO-DATE
Task :prepareLintJar UP-TO-DATE
Task :generateReleaseSources UP-TO-DATE
Task :javaPreCompileRelease UP-TO-DATE
Task :mainApkListPersistenceRelease UP-TO-DATE
Task :generateReleaseResValues UP-TO-DATE
Task :generateReleaseResources UP-TO-DATE
Task :mergeReleaseResources UP-TO-DATE
Task :createReleaseCompatibleScreenManifests UP-TO-DATE
Task :processReleaseManifest
Task :processReleaseResources
Task :compileReleaseJavaWithJavac UP-TO-DATE
Task :compileReleaseSources UP-TO-DATE
Task :lintVitalRelease
Task :mergeReleaseShaders UP-TO-DATE
Task :compileReleaseShaders UP-TO-DATE
Task :generateReleaseAssets UP-TO-DATE
Task :mergeReleaseAssets
Task :validateSigningRelease UP-TO-DATE
Task :signingConfigWriterRelease UP-TO-DATE
Task :checkReleaseDuplicateClasses FAILED
I fixed it by going to Assets > Play Services Resolver > Android Resolver > Delete Resolved Libraries
I had a similar issue. I found I had enabled the built-in ads extensions option in the ads section of services alongside also having the ads package installed. Uninstalling the ads package in the package manager did the job for me
it happened to me and I just solve it by commenting-out the unity-ads on gradle dependencies just like that:
//implementation(name: 'unity-ads', ext:'aar')
I just solved it, basically, the error started when I added the ads Assets from the assets store.
what I didn't know that I Had one installed from the package manager there for it was duplicate
what you should do is to delete the package from the package manager, because if you delete the folders that were downloaded from the asset store you can't implement the listener in your script.
I've fixed that issue by deleting the playcore.arr file from the Assets/GooglePlayPlugins/com.google.play.core/Runtime/Plugins folder
I fixed it by going to Assets > External Dependency Manager > Android Resolver > Delete Resolved Libraries

Removing a dependency in a NuGet package

I'm getting this error when updating a package:
Attempting to resolve dependency XRM.Client.
Circular dependency detected.
Is there anyway to remove the dependency? I don't know how it got there in the first place.
I have tried uninstalling and removing all references to the old package.
The problem was due to having the package listed in the project's packages.config file as well as having a reference.
By leaving the reference in the project, and removing the package from the packages.config, it fixed the problem :)

Karaf unresolved constraint JDBC

I am trying to get a Scala library using H2 database loading in Karaf 3.0.0-RC1 and I got this error
Unresolved constraint in bundle org.h2 [86]: Unable to resolve 86.0: missing requirement
[86.0] osgi.wiring.package; (&(osgi.wiring.package=org.osgi.service.jdbc)(version>=1.0.0)
Does anyone know what I need to add to POM and / or feature.xml to get this working?
Thanks,
Bob
You need that jar that contains the package. To get it:
go to http://search.maven.org
Push Advanced search
To the Classname, type "org.osgi.service.jdbc"
You will get a list of dependencies that contain the package. For example, the first one will be good for you: http://search.maven.org/#artifactdetails|org.ow2.spec.osgi|ow2-jdbc-service-1.0-spec|1.0.13|bundle
Btw.: The package originally comes from the OSGi enterprise spec (or compendium, do not remember). As much as I saw all of the OSGi spec packages are available in ow2 dependencies that separated logically.
In Karaf, there might be other ways to get the dependency you need but I did not use Karaf in the past.

Intellij idea unresolved symbol in grails + gwt project

I have a grails project and I use the gwt plugin 0.6.1. GWT version is configured using ivy.
I have a strange unresolved symbol error when I try to use a class in package com.google.web.*. When I use the complete class names inline idea reports that it cannot resolve the web package. If I import the same class no error ocurres.
I already tried to run grails clean and removed the idea system directory as well - nothing works.
Idea usally import the class when I use smart complete but in this case idea insert the complete classname instead of importing the class.
The web package is found in the gwt-users-2.4.0.jar and gwt-servlet-2.4.0.jar. Both jars are in the classpath but this how the grails gwt plugin organizes gwt dependency.
Error when using full inline claasnames:
No error when using same class in import statement:
Does anyone have an idea?
Fixed already http://youtrack.jetbrains.net/issue/IDEA-81056
Fix is included in the next IDEA 11.1 EAP
http://confluence.jetbrains.com/display/IDEADEV/IDEA+11.1+EAP
I also had similar issue with IntelliJ IDEA, I solved problem by invalidating the idea cache. After invalidating the cache it will reindex all your library and other files. check this answer as well. Grails and IntelliJ Cache Issues