GoogleCloudPlatform / GoogleCloudPlatform/cloud-code-intellij

Gemini and Android plugin conflict

Open
#3,244 7 comments 0 reactions 0 assignees View on GitHub
area/android-studio
Dominant language
No language data
Stars
325
Forks
64
PR merge metrics
No merged PRs in 30d

Description

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](https://github.com/user-attachments/assets/c9b3027d-7633-47b7-ad24-6737e189389e)
```
com.intellij.platform.instanceContainer.internal.InstanceAlreadyRegisteredException: com.android.tools.idea.studiobot.StudioBot is already registered: com.android.tools.idea.studiobot.StudioBot$StubStudioBot. Failed to register: com.android.studio.ml.api.StudioBotImpl.
at com.intellij.platform.instanceContainer.internal.InstanceRegistrarImpl.registerInitializer(InstanceRegistrarImpl.kt:33)
at com.intellij.serviceContainer.ComponentManagerImpl.registerServices2Inner(ComponentManagerImpl.kt:626)
at com.intellij.serviceContainer.ComponentManagerImpl.registerServices(ComponentManagerImpl.kt:563)
at com.intellij.serviceContainer.ComponentManagerImpl.registerComponents(ComponentManagerImpl.kt:331)
at com.intellij.openapi.client.ClientAwareComponentManager.registerComponents(ClientAwareComponentManager.kt:65)
at com.intellij.serviceContainer.ComponentManagerImpl.registerComponents$default(ComponentManagerImpl.kt:313)
at com.intellij.platform.ide.bootstrap.ApplicationLoader$loadApp$2$initServiceContainerJob$1$1.invokeSuspend(ApplicationLoader.kt:103)
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:48)
at com.intellij.platform.ide.bootstrap.ApplicationLoader$loadApp$2$initServiceContainerJob$1.invokeSuspend(ApplicationLoader.kt:102)
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)
```

![{6F53588C-DE3E-437B-9FE1-DC9F4D5746B1}](https://github.com/user-attachments/assets/e2bae706-2482-4f73-bb10-a1dd73c362c4)
```
Unhandled exception in Dispatchers.Default

java.lang.ClassCastException: class com.android.tools.idea.studiobot.StudioBot$StubStudioBot cannot be cast to class com.android.tools.idea.studiobot.StudioBot (com.android.tools.idea.studiobot.StudioBot$StubStudioBot is in unnamed module of loader com.intellij.ide.plugins.cl.PluginClassLoader @7f37149d; com.android.tools.idea.studiobot.StudioBot is in unnamed module of loader com.intellij.ide.plugins.cl.PluginClassLoader @38867e8f)
at com.android.studio.ml.completion.SmlInlineCompletionStatusBarWidgetFactory$Widget.determineCurrentStatus(SmlInlineCompletionStatusBarWidgetFactory.kt:391)
at com.android.studio.ml.completion.SmlInlineCompletionStatusBarWidgetFactory$Widget.access$determineCurrentStatus(SmlInlineCompletionStatusBarWidgetFactory.kt:95)
at com.android.studio.ml.completion.SmlInlineCompletionStatusBarWidgetFactory$Widget$2.invokeSuspend(SmlInlineCompletionStatusBarWidgetFactory.kt:113)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
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)
Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelled}@6cd9fd8a, Dispatchers.Default]
```

![{AFFE069F-879C-4FE2-A5A8-372E89CBBA29}](https://github.com/user-attachments/assets/b10841cc-e3be-4adf-9434-3704d3f49722)

![{AAC14390-4F48-42AE-9560-99DBC14442ED}](https://github.com/user-attachments/assets/72e58d58-bcc9-489c-bf47-f413fe0874df)

_Originally posted by @PabloVKF in https://github.com/GoogleCloudPlatform/cloud-code-intellij/issues/3222#issuecomment-2571713771_

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.