I am getting this error while building the project...
# compose
h
I am getting this error while building the project. Anyone have an idea how can I fix it?
I get the error both android studio build and cmd build with
./gradlew :ui-demos:assembleDebug
l
have you changed any of the source at all? also just to make sure, you’re running the above command in the
ui
directory, right?
h
to make sure nothing is changed I have run
git reset --hard
and tried again I got the same result. yes I am running them in
ui
directory
l
hmm. so an NPE on that line is an indication of the plugins not being loaded properly… which can be caused by a few things.
can you run
repo sync
?
h
ok
done
Copy code
org.jetbrains.kotlin.kapt.idea.KaptGradleModel PluginClassLoader[org.jetbrains.android, 10.3.4.1] com.intellij.ide.plugins.cl.PluginClassLoader@1f6b0154org/jetbrains/kotlin/kapt/idea/KaptGradleModel
org.jetbrains.kotlin.kapt.idea.KaptGradleModel PluginClassLoader[org.jetbrains.android, 10.3.4.1] com.intellij.ide.plugins.cl.PluginClassLoader@1f6b0154
I got this error on startup
l
sorry - where did this error happen?
h
it was on build I think. but I can see it on the Event log like this:
Copy code
01:56	Gradle sync failed: org.jetbrains.kotlin.kapt.idea.KaptGradleModel PluginClassLoader[org.jetbrains.android, 10.3.4.1] com.intellij.ide.plugins.cl.PluginClassLoader@1f6b0154org/jetbrains/kotlin/kapt/idea/KaptGradleModel
			org.jetbrains.kotlin.kapt.idea.KaptGradleModel PluginClassLoader[org.jetbrains.android, 10.3.4.1] com.intellij.ide.plugins.cl.PluginClassLoader@1f6b0154
			Consult IDE log for more details (Help | Show Log) (6 s 790 ms)
l
huh. that’s a new one
can you try this?
Consult IDE log for more details (Help | Show Log) (6 s 790 ms)
or is that what you’re doing already
h
thank you, you pointed me to right direction. I removed all plugins and re run the ./studiow I think it has built. now waiting for indexing to be finished
I have already closed when I saw your last message
l
ok so it seems to be working now?
h
unfortunately not. After a long build I got a similar error
Copy code
> Task :ui-animation:compileDebugKotlin FAILED
e: java.util.NoSuchElementException: Collection contains no element matching the predicate.
	at androidx.compose.plugins.kotlin.ComposableAnnotationChecker$Companion.get(ComposableAnnotationChecker.kt:570)
	at androidx.compose.plugins.kotlin.ComposeDiagnosticSuppressor.isSuppressed(ComposeDiagnosticSuppressor.kt:67)
	at org.jetbrains.kotlin.resolve.diagnostics.BindingContextSuppressCache.isSuppressedByExtension(KotlinSuppressCache.kt:255)
	at org.jetbrains.kotlin.resolve.diagnostics.KotlinSuppressCache.isSuppressed(KotlinSuppressCache.kt:72)
	at org.jetbrains.kotlin.resolve.diagnostics.KotlinSuppressCache.isSuppressed(KotlinSuppressCache.kt:57)
	at org.jetbrains.kotlin.resolve.diagnostics.KotlinSuppressCache$filter$1.invoke(KotlinSuppressCache.kt:52)
	at org.jetbrains.kotlin.resolve.diagnostics.KotlinSuppressCache$filter$1.invoke(KotlinSuppressCache.kt:46)
	at kotlin.collections.CollectionsKt___CollectionsKt.filter(_Collections.kt:2512)
	at org.jetbrains.kotlin.resolve.diagnostics.DiagnosticsWithSuppression.all(DiagnosticsWithSuppression.java:57)
	at org.jetbrains.kotlin.resolve.diagnostics.MutableDiagnosticsWithSuppression.all(MutableDiagnosticsWithSuppression.kt:44)
	at org.jetbrains.kotlin.cli.common.messages.AnalyzerWithCompilerReport$Companion.reportDiagnostics(AnalyzerWithCompilerReport.kt:154)
	at org.jetbrains.kotlin.cli.common.messages.AnalyzerWithCompilerReport$Companion.reportDiagnostics(AnalyzerWithCompilerReport.kt:165)
	at org.jetbrains.kotlin.cli.common.messages.AnalyzerWithCompilerReport.analyzeAndReport(AnalyzerWithCompilerReport.kt:114)
	at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.analyze(KotlinToJVMBytecodeCompiler.kt:387)
	at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.compileModules$cli(KotlinToJVMBytecodeCompiler.kt:119)
	at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:169)
	at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:58)
	at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:84)
	at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:42)
	at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:103)
	at org.jetbrains.kotlin.daemon.CompileServiceImpl$compile$1$1$2.invoke(CompileServiceImpl.kt:442)
	at org.jetbrains.kotlin.daemon.CompileServiceImpl$compile$1$1$2.invoke(CompileServiceImpl.kt:102)
	at org.jetbrains.kotlin.daemon.CompileServiceImpl$doCompile$$inlined$ifAlive$lambda$2.invoke(CompileServiceImpl.kt:1009)
	at org.jetbrains.kotlin.daemon.CompileServiceImpl$doCompile$$inlined$ifAlive$lambda$2.invoke(CompileServiceImpl.kt:102)
	at org.jetbrains.kotlin.daemon.common.DummyProfiler.withMeasure(PerfUtils.kt:137)
	at org.jetbrains.kotlin.daemon.CompileServiceImpl.checkedCompile(CompileServiceImpl.kt:1051)
	at org.jetbrains.kotlin.daemon.CompileServiceImpl.doCompile(CompileServiceImpl.kt:1008)
	at org.jetbrains.kotlin.daemon.CompileServiceImpl.compile(CompileServiceImpl.kt:441)
	at sun.reflect.GeneratedMethodAccessor100.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:346)
	at sun.rmi.transport.Transport$1.run(Transport.java:200)
	at sun.rmi.transport.Transport$1.run(Transport.java:197)
	at java.security.AccessController.doPrivileged(Native Method)
	at sun.rmi.transport.Transport.serviceCall(Transport.java:196)
	at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:568)
	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:826)
	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:683)
	at java.security.AccessController.doPrivileged(Native Method)
	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:682)
	at
l
can you run
./gradlew :compose-plugin-ide:assemble :compose-plugin-cli:ideVersion
h
it is successful. should I retry building?
l
yeah
h
ok now when I build from android studio I get this error
Project 'lint-checks' not found in root project 'ui'.
when I press run for ui-demos I get the same error above.
ok for a clean start I deleted ~/Library/Application\ Support/AndroidStudio3.4-R4A ~/.AndroidStudioAndroidX-compose androidx-master-dev folder that I checked out with repo is there anything else I need to delete?
l
lol ugh i hate this
that sounds like it would be everything
h
I will give another try over the weekend.
thank you for your help
b
I have the exact same error here. But it doesn’t relate to android studio. I found the same bug in the issue tracker and added my log files there: https://issuetracker.google.com/issues/132402803#comment7
h
thanks.
someone recommended to change the kotlin version but it didn’t work for me
I will star it as well
o
I have the same problem, did you find/fix the issue yet @Leland Richardson [G]?
l
hmm. i’m currently working in an unrebase-able branch and i’m scared to leave it lol. you’re running into this on a clean checkout?
o
yep
One thing I did though was import settings from a different installation (keyboard shortcuts, etc). I will try to wipe them and start really-really clean tomorrow
l
one thing to make sure you don’t do is update kotlin
if you get the kotlin update dialog, don’t press it
o
yeah, that I figured 🙂
l
if you open up the plugins menu, make sure that “Kotlin” is pointing to the bundled kotlin
o
where is the settings folder for this custom installation?
l
i think it should be pointing to
.AndroidStudioAndroidX-compose