Vladimír Púpava
08/15/2025, 12:32 PMUnable to load class 'Class 'com.android.build.api.attributes.BuildTypeAttr$Impl' not found in class loader 'InstrumentingVisitableURLClassLoader(ClassLoaderScopeIdentifier.Id{coreAndPlugins:settings[:]:buildSrc[:]:root-project[:](export)})' of type 'org.gradle.internal.classloader.VisitableURLClassLoader$InstrumentingVisitableURLClassLoader'.'
Class 'com.android.build.api.attributes.BuildTypeAttr$Impl' not found in class loader 'InstrumentingVisitableURLClassLoader(ClassLoaderScopeIdentifier.Id{coreAndPlugins:settings[:]:buildSrc[:]:root-project[:](export)})' of type 'org.gradle.internal.classloader.VisitableURLClassLoader$InstrumentingVisitableURLClassLoader'.
Steps to reproduce (100% reproducible), i would guess force serialized configuration cache to be used:
1. Open the attached project in Android Studio in my case Narwhal Feature Drop on windows.
2. Run App for Android target, might be needed few times until all tasks are always up to date.
3. Close Android Studio.
4. Start it again and try to build — it will get permanently stuck with the error above until you invalidate configuration cache.
The issue does not occur if com.android.kotlin.multiplatform.library is replaced with com.android.library (with proper configuration). That’s the workaround I’m currently using in our project.
It’s possible I’m missing something obvious — any insights or help would be greatly appreciated!zsmb
08/15/2025, 3:53 PMVladimír Púpava
08/15/2025, 5:10 PMtapchicoma
08/19/2025, 7:30 AM