Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin not working properly with new Android Studio version #18

Closed
Dukoff92 opened this issue Nov 28, 2024 · 6 comments · Fixed by #19
Closed

Plugin not working properly with new Android Studio version #18

Dukoff92 opened this issue Nov 28, 2024 · 6 comments · Fixed by #19

Comments

@Dukoff92
Copy link

Hello!

Thanks again for the effort you put towards making this plugin!

Unfortunately, I have a problem and the plugin is not working with the new Android Studio Meerkat | 2024.3.1 Canary version. Previously we had the option to start the matrix selector from Build > Build Variant Matrix Selector but the option is no longer there.
Also, if I manually start the plugin by using Run Everything function from Android Studio and try to change the build variant using the matrix selector I am getting many errors that my modules can't not resolved.

@Nilzor
Copy link
Owner

Nilzor commented Nov 28, 2024

I'm looking into the first problem. As you say, you can still invoke the plugin manually by doing "Find action" and search for the name "Select Build Variant by Matrix".

However the errors you talk about when chaging build variants, I cannot reproduce. Do you have some logs from idea.log you could send me please? (Help - Show log in explorer)

@Nilzor
Copy link
Owner

Nilzor commented Nov 28, 2024

I've made a build for Meerkat Canary 3 that works on my machine. Menu item confirmed back in the Build menu. Again I havent' been able to reproduce the second issue you mentioned but maybe a fresh build with a Kotlin version supported for Meerkat helps.

You are free to install this plugin manually from disk (click the cogwheel icon in the plugin selector) if you like:

https://github.com/Nilzor/build-variant-matrix/releases/tag/v1.4.0-alpha1

@Dukoff92
Copy link
Author

Hi and thanks for the quick reaction!

Here's what I got from the log:

2024-11-29 00:38:09,819 [559864678] SEVERE - #com.nilsenlabs.flavormatrix.actions.old.LegacyBuildVariantUpdater - Unable to select build variant:
Cannot find module 'MyApp.feature.dashboard.impl'.
java.lang.Throwable: Unable to select build variant:
Cannot find module 'MyApp.feature.dashboard.impl'.
	at com.intellij.openapi.diagnostic.Logger.error(Logger.java:376)
	at com.nilsenlabs.flavormatrix.actions.old.LegacyBuildVariantUpdater.logAndShowBuildVariantFailure(LegacyBuildVariantUpdater.java:305)
	at com.nilsenlabs.flavormatrix.actions.old.LegacyBuildVariantUpdater.updateSelectedBuildVariant(LegacyBuildVariantUpdater.java:65)
	at com.nilsenlabs.flavormatrix.actions.SelectBuildVariantMatrixAction.actionPerformed(SelectBuildVariantMatrixAction.kt:30)
	at com.intellij.openapi.actionSystem.ex.ActionUtil.doPerformActionOrShowPopup(ActionUtil.kt:374)
	at com.intellij.ide.actions.GotoActionAction.lambda$performActionImpl$4(GotoActionAction.java:89)
	at com.intellij.openapi.actionSystem.impl.ActionManagerImpl.performWithActionCallbacks(ActionManagerImpl.kt:1177)
	at com.intellij.openapi.actionSystem.ex.ActionUtil.performDumbAwareWithCallbacks(ActionUtil.kt:396)
	at com.intellij.ide.actions.GotoActionAction.performActionImpl(GotoActionAction.java:88)
	at com.intellij.ide.actions.GotoActionAction.lambda$performAction$2(GotoActionAction.java:68)
	at com.intellij.openapi.application.TransactionGuardImpl.runWithWritingAllowed(TransactionGuardImpl.java:236)
	at com.intellij.openapi.application.TransactionGuardImpl.access$100(TransactionGuardImpl.java:25)
	at com.intellij.openapi.application.TransactionGuardImpl$1.run(TransactionGuardImpl.java:198)
	at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runIntendedWriteActionOnCurrentThread$lambda$2(AnyThreadWriteThreadingSupport.kt:217)
	at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runWriteIntentReadAction(AnyThreadWriteThreadingSupport.kt:128)
	at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runIntendedWriteActionOnCurrentThread(AnyThreadWriteThreadingSupport.kt:216)
	at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:842)
	at com.intellij.openapi.application.impl.ApplicationImpl$2.run(ApplicationImpl.java:421)
	at com.intellij.util.concurrency.ChildContext$runInChildContext$1.invoke(propagation.kt:101)
	at com.intellij.util.concurrency.ChildContext$runInChildContext$1.invoke(propagation.kt:101)
	at com.intellij.util.concurrency.ChildContext.runInChildContext(propagation.kt:107)
	at com.intellij.util.concurrency.ChildContext.runInChildContext(propagation.kt:101)
	at com.intellij.util.concurrency.ContextRunnable.run(ContextRunnable.java:27)
	at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:117)
	at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:43)
	at java.desktop/java.awt.event.InvocationEvent.dispatch(Unknown Source)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
	at java.desktop/java.awt.EventQueue$4.run(Unknown Source)
	at java.base/java.security.AccessController.doPrivileged(Unknown Source)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source)
	at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.kt:675)
	at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.kt:573)
	at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$18$lambda$17$lambda$16$lambda$15(IdeEventQueue.kt:355)
	at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:857)
	at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$18$lambda$17$lambda$16(IdeEventQueue.kt:354)
	at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$2$lambda$1(IdeEventQueue.kt:1045)
	at com.intellij.openapi.application.WriteIntentReadAction.lambda$run$0(WriteIntentReadAction.java:24)
	at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runWriteIntentReadAction(AnyThreadWriteThreadingSupport.kt:128)
	at com.intellij.openapi.application.impl.ApplicationImpl.runWriteIntentReadAction(ApplicationImpl.java:916)
	at com.intellij.openapi.application.WriteIntentReadAction.compute(WriteIntentReadAction.java:55)
	at com.intellij.openapi.application.WriteIntentReadAction.run(WriteIntentReadAction.java:23)
	at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$2(IdeEventQueue.kt:1045)
	at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$3(IdeEventQueue.kt:1054)
	at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:109)
	at com.intellij.ide.IdeEventQueueKt.performActivity(IdeEventQueue.kt:1054)
	at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$18(IdeEventQueue.kt:349)
	at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.kt:395)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.run(Unknown Source)
2024-11-29 00:38:09,820 [559864679] SEVERE - #com.nilsenlabs.flavormatrix.actions.old.LegacyBuildVariantUpdater - Android Studio Meerkat | 2024.3.1 Canary 3  Build #AI-243.21565.193.2431.12691553
2024-11-29 00:38:09,820 [559864679] SEVERE - #com.nilsenlabs.flavormatrix.actions.old.LegacyBuildVariantUpdater - JDK: 21.0.5; VM: OpenJDK 64-Bit Server VM; Vendor: JetBrains s.r.o.
2024-11-29 00:38:09,820 [559864679] SEVERE - #com.nilsenlabs.flavormatrix.actions.old.LegacyBuildVariantUpdater - OS: Mac OS X
2024-11-29 00:38:09,820 [559864679] SEVERE - #com.nilsenlabs.flavormatrix.actions.old.LegacyBuildVariantUpdater - Plugin to blame: Build Variant Matrix Selector version: 1.3.0
2024-11-29 00:38:09,820 [559864679] SEVERE - #com.nilsenlabs.flavormatrix.actions.old.LegacyBuildVariantUpdater - Last Action: SelectBuildVariantMatrixAction

I am getting this error for all the modules. When I click OK on all the error dialogs the plugin actually tries to change the build variant but changes it successfully only for some and not all of them.

@Nilzor
Copy link
Owner

Nilzor commented Dec 5, 2024

I've made another attempt now with alpha2 https://github.com/Nilzor/build-variant-matrix/releases/tag/v1.4.0-alpha2

Really appreciate if you could give me feedback again. The logs are also improved so everything that are prefixed with the following in idea.log is relevant for me:

com.nilsenlabs.flavormatrix.actions.SelectBuildVariantMatrixAction

@Dukoff92
Copy link
Author

Dukoff92 commented Dec 9, 2024

Thanks for the extra attempt you made!

It appears that now, with the alpha2, it works as expected. I don't see any error dialogs when changing build variants.
Let me know if you still need the logs though

@Nilzor
Copy link
Owner

Nilzor commented Jan 4, 2025

Awesome, thanks for the feedback. Closing the issue and publishing on beta and production channels today

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants