cloud-code-intellij icon indicating copy to clipboard operation
cloud-code-intellij copied to clipboard

Gemini and Android plugin conflict - Duplicate registration for EP com.android.tools.idea.ml.mimetypeAugmenter

Open CrazyCoder opened this issue 1 year ago • 15 comments

See https://youtrack.jetbrains.com/issue/IJPL-160086/Start-Failed-Duplicate-registration-for-EP-com.android.tools.idea.ml.mimetypeAugmenter.

Internal error

com.intellij.diagnostic.PluginException: Duplicate registration for EP com.android.tools.idea.ml.mimetypeAugmenter first in PluginDescriptor(name=Gemini Code Assist, id=com.google.tools.ij.aiplugin, descriptorPath=plugin.xml, path=~/.local/share/JetBrains/IntelliJIdea2024.2/gemini, version=1.0.0-242-RC7, package=null, isBundled=false), second in PluginDescriptor(name=Android, id=org.jetbrains.android, descriptorPath=plugin.xml, path=~/.local/share/JetBrains/IntelliJIdea2024.2/android, version=242.20224.300, package=null, isBundled=false)
at com.intellij.serviceContainer.ComponentManagerImpl.createError(ComponentManagerImpl.kt:974)
at com.intellij.serviceContainer.ComponentManagerImpl.createError(ComponentManagerImpl.kt:93)
at com.intellij.openapi.extensions.impl.ExtensionsAreaImplKt.createExtensionPoints(ExtensionsAreaImpl.kt:51)
at com.intellij.serviceContainer.ComponentManagerImpl.registerComponents(ComponentManagerImpl.kt:349)
at com.intellij.openapi.client.ClientAwareComponentManager.registerComponents(ClientAwareComponentManager.kt:58)
at com.intellij.serviceContainer.ComponentManagerImpl.registerComponents$default(ComponentManagerImpl.kt:307)
at com.intellij.platform.ide.bootstrap.ApplicationLoader$loadApp$2$initServiceContainerJob$1$1.invokeSuspend(ApplicationLoader.kt:105)
at com.intellij.platform.ide.bootstrap.ApplicationLoader$loadApp$2$initServiceContainerJob$1$1.invoke(ApplicationLoader.kt)
at com.intellij.platform.ide.bootstrap.ApplicationLoader$loadApp$2$initServiceContainerJob$1$1.invoke(ApplicationLoader.kt)
at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:62)
at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:163)
at kotlinx.coroutines.BuildersKt.withContext(Unknown Source)
at com.intellij.platform.diagnostic.telemetry.impl.TracerKt.span(tracer.kt:56)
at com.intellij.platform.diagnostic.telemetry.impl.TracerKt.span$default(tracer.kt:49)
at com.intellij.platform.ide.bootstrap.ApplicationLoader$loadApp$2$initServiceContainerJob$1.invokeSuspend(ApplicationLoader.kt:104)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.UndispatchedCoroutine.afterResume(CoroutineContext.kt:277)
at kotlinx.coroutines.AbstractCoroutine.resumeWith(AbstractCoroutine.kt:99)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:104)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:608)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:873)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:763)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:750)

JRE: 21.0.3+13-b509.4 amd64 (JetBrains s.r.o.)
/home/segfault/.local/share/JetBrains/Toolbox/apps/intellij-idea-ultimate/jbr

CrazyCoder avatar Aug 13 '24 16:08 CrazyCoder

Thanks for the report @CrazyCoder. It seems you have Android plugin installed that has same AS related endpoints we use in the new Gemini implementation. Just in case, Android Studio also has Gemini plugin without conflicts, in the meanwhile, we'll figure out the way to cooperate with JB Android plugin.

To make our understanding more clear, what is your use case for Android + IntelliJ vs. Android Studio, developing for both backend and mobile in the same IDE?

ivanporty avatar Aug 13 '24 18:08 ivanporty

I'm from JetBrains support team. This conflict prevents users from starting IntelliJ IDEA. I reported the issue on behalf of our users. Please see YouTrack link and its duplicates for the original reports.

CrazyCoder avatar Aug 13 '24 21:08 CrazyCoder

Thanks @CrazyCoder. We are working on the issue for the next release.

ivanporty avatar Aug 13 '24 22:08 ivanporty

@ivanporty As for my use case, I pay for having better features and less tools management in one IDE that can do Flutter / Android / Java Server / remote docker / python / DB (for Android sqlite, Postgresql server and BigQuery).

cputoaster avatar Aug 16 '24 15:08 cputoaster

I faced the same issue with the Gemini Plugin. I switched from Android Studio to IntelliJ because Android Studio does not download sources of libraries.

regulskimichal avatar Aug 17 '24 12:08 regulskimichal

I cannot start IDEA and had to reset all settings due to this bug.

tranvansang avatar Aug 20 '24 13:08 tranvansang

We are working with Android team to remove the conflicts

ivanporty avatar Aug 20 '24 15:08 ivanporty

We made Gemini Code Assist plugin explicitly incompatible with Android plugin since 24.8.2 to avoid the IDE crash, and working to resolve the duplicate pieces. We will update once done.

ivanporty avatar Sep 09 '24 15:09 ivanporty

I just want google cloud integration, I don't really care about Gemini and bundling it together just made the experience much worse, as I am unable to use Jetbrains code completion.

thiagoanglervision avatar Sep 09 '24 16:09 thiagoanglervision

JB code completion will be enabled soon, since we upgraded our completion implementation to IDE native one. We are looking into making Cloud and Gemini integrations independent.

ivanporty avatar Sep 09 '24 20:09 ivanporty

To make it explicitly incompatible is not a solution. Now I have to disable Android support to be able to enable Cloud code.. But I need both :(

herbertvuijk avatar Sep 11 '24 15:09 herbertvuijk

Sorry about this, we are actively working on removing this conflict.

ivanporty avatar Sep 11 '24 15:09 ivanporty

In the meantime, the Jetbrains AI Assist does work with the rest of the plug-ins including Flutter related, so until this is fixed, I will go with that for a while. We had the Geminii plug-in hanging issue with 2024.1, so a bit frustrated of the timing of these breaks. Hope you get to the fix so that I can get back to use Gemini.

imanabu avatar Sep 13 '24 03:09 imanabu

Any update. Or is there a way to get cloud code without Gemini AI parts? All I want is the connection to GCP projects.

ihachani avatar Oct 22 '24 10:10 ihachani

We are actively working on removing conflicting parts from Gemini and Android plugins and they should be able to work together soon.

ivanporty avatar Oct 22 '24 15:10 ivanporty

This conflict has now been resolved, please upgrade to 1.4.0 and you can use both plugins together.

ivanporty avatar Nov 12 '24 14:11 ivanporty

The conflict warning is gone, but it still doesn't work if you keep the Android plugin active. I've disabled and enabled the Android plugin several times to be sure, and Gemini only works with it disabled.

image {AFFE069F-879C-4FE2-A5A8-372E89CBBA29}

PabloVKF avatar Jan 05 '25 18:01 PabloVKF