Status Update
Comments
am...@google.com <am...@google.com>
em...@google.com <em...@google.com>
ji...@gmail.com <ji...@gmail.com> #2
The same error at Android Studio Meerkat | 2024.3.1 Canary 2 Build #AI-243.21565.129.2431.12655144, built on November 14, 2024. However, same project work well at Android Studio Meerkat | 2024.3.1 Canary 1.
ra...@mapbox.com <ra...@mapbox.com> #3
Same problem for us but we're using Android Gradle Plugin 7.4.2 and Gradle 7.5.1.
Versions summary
Android Studio Meerkat | 2024.3.1 Canary 2
Build #AI-243.21565.129.2431.12655144, built on November 14, 2024
Runtime version: 21.0.5+-12651406-b631.16 aarch64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Toolkit: sun.lwawt.macosx.LWCToolkit
macOS 14.7.1
GC: G1 Young Generation, G1 Concurrent GC, G1 Old Generation
Memory: 16384M
Cores: 10
Metal Rendering is ON
Registry:
debugger.new.tool.window.layout=true
ide.experimental.ui=true
i18n.locale=
terminal.new.ui=true
ide.images.show.chessboard=true
Non-Bundled Plugins:
com.jetbrains.CyanTheme (1.3)
idea.plugin.protoeditor (243.21565.122)
com.jetbrains.darkPurpleTheme (1.3)
com.developerphil.adbidea (1.6.18)
org.jetbrains.compose.desktop.ide (1.7.1)
Stack trace
2024-11-15 10:12:51,452 [ 63577] SEVERE - #c.i.o.e.s.p.m.ProjectDataManagerImpl - java.lang.IllegalStateException: Module source root type com.android.tools.idea.gradle.project.facet.ndk.NativeSourceRootType@33af9309 is not registered as JpsModelSerializerExtension
java.lang.RuntimeException: java.lang.IllegalStateException: Module source root type com.android.tools.idea.gradle.project.facet.ndk.NativeSourceRootType@33af9309 is not registered as JpsModelSerializerExtension
at com.intellij.openapi.application.impl.LaterInvocator.invokeAndWait(LaterInvocator.java:133)
at com.intellij.openapi.application.impl.ApplicationImpl.invokeAndWait(ApplicationImpl.java:411)
at com.intellij.openapi.application.ex.ApplicationUtil.invokeAndWaitSomewhere(ApplicationUtil.kt:189)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcessWithProgressSynchronously(CoreProgressManager.java:600)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcessWithProgressSynchronously(ProgressManagerImpl.java:104)
at com.intellij.openapi.progress.impl.CoreProgressManager.run(CoreProgressManager.java:428)
at com.intellij.openapi.progress.Task.queue(Task.java:137)
at com.android.tools.ndk.sync.NativeDataService.importData(NativeDataService.kt:75)
at com.intellij.openapi.externalSystem.service.project.manage.ProjectDataManagerImpl.lambda$doImportData$6(ProjectDataManagerImpl.java:310)
at com.intellij.openapi.externalSystem.util.ExternalSystemTelemetryUtil.lambda$runWithSpan$0(ExternalSystemTelemetryUtil.java:27)
at com.intellij.platform.diagnostic.telemetry.helpers.TraceKt.use(trace.kt:30)
at com.intellij.openapi.externalSystem.util.ExternalSystemTelemetryUtil.runWithSpan(ExternalSystemTelemetryUtil.java:26)
at com.intellij.openapi.externalSystem.service.project.manage.ProjectDataManagerImpl.doImportData(ProjectDataManagerImpl.java:309)
at com.intellij.openapi.externalSystem.service.project.manage.ProjectDataManagerImpl.importData(ProjectDataManagerImpl.java:178)
at com.intellij.openapi.externalSystem.service.project.manage.ProjectDataManagerImpl.importData(ProjectDataManagerImpl.java:92)
at com.android.tools.idea.gradle.project.sync.idea.IdeaSyncPopulateProjectTask.populateProject(IdeaSyncPopulateProjectTask.java:59)
at com.android.tools.idea.gradle.project.sync.idea.ProjectSetUpTask.doPopulateProject(ProjectSetUpTask.java:54)
at com.android.tools.idea.gradle.project.sync.idea.ProjectSetUpTask.onSuccess(ProjectSetUpTask.java:48)
at com.intellij.openapi.externalSystem.util.ExternalSystemUtil.handleSyncResult(ExternalSystemUtil.java:593)
at com.intellij.openapi.externalSystem.util.ExternalSystemUtil.lambda$executeSync$0(ExternalSystemUtil.java:481)
at com.intellij.openapi.externalSystem.util.ExternalSystemTelemetryUtil.lambda$runWithSpan$0(ExternalSystemTelemetryUtil.java:27)
at com.intellij.platform.diagnostic.telemetry.helpers.TraceKt.use(trace.kt:30)
at com.intellij.openapi.externalSystem.util.ExternalSystemTelemetryUtil.runWithSpan(ExternalSystemTelemetryUtil.java:26)
at com.intellij.openapi.externalSystem.util.ExternalSystemUtil.lambda$executeSync$1(ExternalSystemUtil.java:480)
at com.intellij.openapi.externalSystem.util.ExternalSystemUtil.incompleteDependenciesState(ExternalSystemUtil.java:496)
at com.intellij.openapi.externalSystem.util.ExternalSystemUtil.executeSync(ExternalSystemUtil.java:474)
at com.intellij.openapi.externalSystem.util.ExternalSystemUtil$2.lambda$execute$0(ExternalSystemUtil.java:337)
at com.intellij.openapi.externalSystem.util.ExternalSystemTelemetryUtil.lambda$runWithSpan$0(ExternalSystemTelemetryUtil.java:27)
at com.intellij.platform.diagnostic.telemetry.helpers.TraceKt.use(trace.kt:30)
at com.intellij.openapi.externalSystem.util.ExternalSystemTelemetryUtil.runWithSpan(ExternalSystemTelemetryUtil.java:26)
at com.intellij.openapi.externalSystem.util.ExternalSystemUtil$2.execute(ExternalSystemUtil.java:336)
at com.intellij.openapi.externalSystem.util.ExternalSystemTaskUnderProgress$2.run(ExternalSystemTaskUnderProgress.java:55)
at com.intellij.openapi.progress.impl.CoreProgressManager.startTask(CoreProgressManager.java:491)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.startTask(ProgressManagerImpl.java:133)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcessWithProgressAsynchronously$7(CoreProgressManager.java:542)
at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$4(ProgressRunner.java:249)
at com.intellij.openapi.progress.ProgressManager.lambda$runProcess$0(ProgressManager.java:98)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$1(CoreProgressManager.java:223)
at com.intellij.platform.diagnostic.telemetry.helpers.TraceKt.use(trace.kt:45)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:222)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$executeProcessUnderProgress$14(CoreProgressManager.java:674)
at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:749)
at com.intellij.openapi.progress.impl.CoreProgressManager.computeUnderProgress(CoreProgressManager.java:705)
at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:673)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:79)
at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:203)
at com.intellij.openapi.progress.ProgressManager.runProcess(ProgressManager.java:98)
at com.intellij.openapi.progress.impl.ProgressRunner.lambda$submit$5(ProgressRunner.java:249)
at com.intellij.openapi.progress.impl.ProgressRunner$ProgressRunnable.run(ProgressRunner.java:502)
at com.intellij.openapi.progress.impl.ProgressRunner.lambda$launchTask$18(ProgressRunner.java:467)
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.openapi.progress.impl.ProgressRunner.lambda$launchTask$19(ProgressRunner.java:463)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Unknown Source)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Unknown Source)
at java.base/java.security.AccessController.doPrivileged(Unknown Source)
at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.lang.IllegalStateException: Module source root type com.android.tools.idea.gradle.project.facet.ndk.NativeSourceRootType@33af9309 is not registered as JpsModelSerializerExtension
at com.intellij.workspaceModel.ide.impl.legacyBridge.module.roots.ModifiableContentEntryBridge.addSourceFolder(ModifiableContentEntryBridge.kt:62)
at com.intellij.workspaceModel.ide.impl.legacyBridge.module.roots.ModifiableContentEntryBridge.addSourceFolder(ModifiableContentEntryBridge.kt:274)
at com.intellij.workspaceModel.ide.impl.legacyBridge.module.roots.ModifiableContentEntryBridge.addSourceFolder(ModifiableContentEntryBridge.kt:236)
at com.android.tools.ndk.sync.NativeWorkspaceImpl.syncSourceRoots(NativeWorkspaceImpl.kt:526)
at com.android.tools.ndk.sync.NativeWorkspaceImpl.updateContentRoots(NativeWorkspaceImpl.kt:431)
at com.android.tools.ndk.sync.NativeWorkspaceImpl.commit(NativeWorkspaceImpl.kt:319)
at com.android.tools.ndk.sync.NativeWorkspaceModificationTask.onSuccess(NativeWorkspaceModificationTask.kt:95)
at com.intellij.openapi.progress.impl.CoreProgressManager.finishTask(CoreProgressManager.java:651)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.finishTask(ProgressManagerImpl.java:173)
at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcessWithProgressSynchronously$11(CoreProgressManager.java:602)
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.openapi.application.impl.AppImplKt.rethrowExceptions$lambda$2(appImpl.kt:57)
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.AppImplKt.rethrowExceptions$lambda$3(appImpl.kt:68)
at com.intellij.openapi.application.impl.LaterInvocator$1.run(LaterInvocator.java:102)
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)
ne...@gmail.com <ne...@gmail.com> #4
Sorry to drop in again, but I think it's reasonable to raise the severity to S1 - at least - and have the team to fix at least the crash asap.
Since if we can't sync, we're unable to build and run the project from the UI, the c++ source set doesn't show up and therefore the editing is severely limited as well. This becomes supremely irritating very quickly.
jo...@google.com <jo...@google.com> #5
I'm unable to reproduce this with the given repro steps. Here's what I did:
- Install Meerkat 2024.3.1 nightly
- File -> New -> New Project -> Empty Activity
- Select Groovy DSL in dropdown -> Finish
- Wait for Gradle sync
- Add the following in app/build.gradle:
// elided...
android {
// elided...
defaultConfig {
// elided..
ndk {
abiFilters 'armeabi-v7a', 'x86' // Specify desired architectures (optional)
}
}
- Steps diverge from original repro steps here because the original steps don't look accurate for Meerkat 2024.3.1
- Check lib.versions.toml and confirm entry for agp = "8.7.2".
- Sync at this point succeeds with no callstack.
Please advise on repro steps.
Also, since it sounds like this is an existing project, please try File -> Invalidate Caches / Restart....
jo...@google.com <jo...@google.com> #6
We have repro steps from another source now.
ye...@gmail.com <ye...@gmail.com> #7
Same for the latest canary 2
ye...@gmail.com <ye...@gmail.com> #8
When downgrade to canary 1 it works
aw...@gmail.com <aw...@gmail.com> #9
the error only occurs when i set externalNativeBuild->cmake->path
it doesn't occur when i only set externalNativeBuild->cmake->version
or anything else, only cmake path
makes it crash.
probably the issue is due to:
it probably should implement JpsModelSerializerExtension
20...@gmail.com <20...@gmail.com> #10
Build #AI-243.21565.129.2431.12655144, built on November 14, 2024
jo...@google.com <jo...@google.com> #11
I found that the canary 2 version of Meerkat does contain META-INF/services/org.jetbrains.jps.model.serialization.JpsModelSerializerExtension for com.android.tools.idea.gradle.project.facet.ndk.NativeJpsModelSerializerExtension.
android-studio/plugins/android/lib/android.jar
======META-INF/services/org.jetbrains.jps.model.serialization.JpsModelSerializerExtension
So it appears that this wasn't triggered by a build change.
jo...@google.com <jo...@google.com> #12
Right now, I'm thinking it is somehow classloader related. That is, the code that is executing the extension point logic isn't finding out extension point because its not available to the current classloader
ka...@gmail.com <ka...@gmail.com> #13
File -> Plugin -> Android NDK Support
and disable this plugin
ne...@gmail.com <ne...@gmail.com> #14
You most certainly do not fix the issue by disabling the plugin. You mitigate the sync failure, but Android Studio will not see C++ files and you will get additional errors in the IDE.
jo...@google.com <jo...@google.com>
zu...@gmail.com <zu...@gmail.com> #15
Which version has been fixed?
an...@google.com <an...@google.com> #16
Thank you for your patience while our engineering team worked to resolve this issue. A fix for this issue is now available in:
- Android Studio Meerkat | 2024.3.1 Canary 3
- Android Gradle Plugin 8.9.0-alpha03
We encourage you to try the latest update.
If you notice further issues or have questions, please file a new bug report.
Thank you for taking the time to submit feedback — we really appreciate it!
Description
Summary: Gradle sync fails in Android Studio projects with Native Development Kit (NDK) enabled when using the latest stable Android Gradle Plugin (AGP) version 8.7.2. This results in the error message:
Steps to Reproduce:
build.gradle
(app level), enable NDK support by adding the following line within theandroid
block:classpath
section in your project's rootbuild.gradle
file:Expected Behavior: The project should successfully synchronize with Gradle and be ready for development with NDK support.
Actual Behavior: Gradle sync fails with the error message:
Additional Information:
Stacktrace: