You could use the same approach to listen to any status, but this example includes network connectivity specifics too (ConnectionChangeReceiver
and AndroidUtils.isConnected
).
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> Task :app:kaptGenerateStubsDebugKotlin FAILED | |
e: java.lang.IllegalAccessError: class org.jetbrains.kotlin.kapt3.base.KaptContext (in unnamed module @0x6a6abeee) cannot access class com.sun.tools.javac.util.Context (in module jdk.compiler) because module jdk.compiler does not export com.sun.tools.javac.util to unnamed module @0x6a6abeee | |
at org.jetbrains.kotlin.kapt3.base.KaptContext.<init>(KaptContext.kt:28) | |
at org.jetbrains.kotlin.kapt3.KaptContextForStubGeneration.<init>(KaptContextForStubGeneration.kt:40) | |
at org.jetbrains.kotlin.kapt3.AbstractKapt3Extension.contextForStubGeneration(Kapt3Extension.kt:287) | |
at org.jetbrains.kotlin.kapt3.AbstractKapt3Extension.analysisCompleted(Kapt3Extension.kt:171) | |
at org.jetbrains.kotlin.kapt3.ClasspathBasedKapt3Extension.analysisCompleted(Kapt3Extension.kt:102) | |
at org.jetbrains.kotlin.cli.jvm.compiler.TopDownAnalyzerFacadeForJVM.analyzeFilesWithJavaIntegration$invokeExtensionsOnAnalysisComplete(TopDownAnalyzerFacadeForJVM.kt:112) | |
at org.jetbrains.kotlin.cli.jvm.com |
As answers to this Stack Overflow question
reveal, using <!---
and --->
or <!--
and -->
works (view source by clicking "Raw"):
OlderNewer