[Android Q&A, Help & Troubleshooting] DuLin081682:
I'm trying to compile arrow os for android 12.1 for my device, but I'm having some problems with the last point, can anyone help me? The log file is as follows.

FAILED: //frameworks/base/packages/SystemUI:SystemUI-core kapt [common]
Outputs: /home/dulin/arrow/out/soong/.intermediates/frameworks/base/packages/SystemUI/SystemUI-core/android_common/kapt/kapt-sources.jar /home/dulin/arrow/out/soong/.intermediates/frameworks/base/packages/SystemUI/SystemUI-core/android_common/kapt/kapt-res.jar
Error: exited with code: 1
Command: rm -rf "/home/dulin/arrow/out/soong/.intermediates/frameworks/base/packages/SystemUI/SystemUI-core/android_common/kapt/srcJars" "/home/dulin/arrow/out/soong/.intermediates/frameworks/base/packages/SystemUI/SystemUI-core/android_common/kapt/build.xml" "/home/dulin/arrow/out/soong/.intermediates/frameworks/base/packages/SystemUI/SystemUI-core/android_common/kapt/gen" && mkdir -p "/home/dulin/arrow/out/soong/.intermediates/frameworks/base/packages/SystemUI/SystemUI-core/android_common/kapt/srcJars" "/home/dulin/arrow/out/soong/.intermediates/frameworks/base/packages/SystemUI/SystemUI-core/android_common/kapt/gen/sources" "/home/dulin/arrow/out/soong/.intermediates/frameworks/base/packages/SystemUI/SystemUI-core/android_common/kapt/gen/classes" && /home/dulin/arrow/out/soong/host/linux-x86/bin/zipsync -d /home/dulin/arrow/out/soong/.intermediates/frameworks/base/packages/SystemUI/SystemUI-core/android_common/kapt/srcJars -l /home/dulin/arrow/out/soong/.intermediates/frameworks/base/packages/SystemUI/SystemUI-core/android_common/kapt/srcJars/list -f "*.java" /home/dulin/arrow/out/soong/.intermediates/frameworks/base/packages/SystemUI/SystemUI-core/android_common/gen/aidl/aidl0.srcjar /home/dulin/arrow/out/soong/.intermediates/frameworks/base/packages/SystemUI/SystemUI-core/android_common/gen/android/R.srcjar && /home/dulin/arrow/out/soong/host/linux-x86/bin/gen-kotlin-build-file.py --classpath "/home/dulin/arrow/out/soong/.intermediates/libcore/mmodules/core_platform_api/legacy.core.platform.api.stubs/android_common/turbine-combined/legacy.core.platform.api.stubs.jar:/home/dulin/arrow/out/soong/.intermediates/libcore/core-lambda-stubs/android_common/turbine-combined/core-lambda-stubs.jar:/home/dulin/arrow/out/soong/.intermediates/frameworks/base/ext/android_common/turbine-combined/ext.jar:/home/dulin/arrow/out/soong/.intermediates/frameworks/base/framework/android_common/turbine-combined/framework.jar:/home/dulin/arrow/out/soong/.intermediates/frameworks/base/libs/WindowManager/Shell/WindowManager-Shell/android_common/combined/WindowManager-Shell.jar:/home/dulin/arrow/out/soong/.intermediates/frameworks/base/packages/SystemUI/animation/SystemUIAnimationLib/android_common/turbine-combined/SystemUIAnimationLib.jar:/home/dulin/arrow/out/soong/.intermediates/frameworks/base/packages/SystemUI/plugin/SystemUIPluginLib/android_common/turbine-combined/SystemUIPluginLib.jar:/home/dulin/arrow/out/soong/.intermediates/frameworks/base/packages/SystemUI/shared/SystemUISharedLib/android_common/turbine-combined/SystemUISharedLib.jar:/home/dulin/arrow/out/soong/.intermediates/frameworks/base/packages/SystemUI/shared/SystemUI-statsd/android_common/turbine-combined/SystemUI-statsd.jar:/home/dulin/arrow/out/soong/.intermediates/frameworks/base/packages/SettingsLib/SettingsLib/android_common/turbine-combined/SettingsLib.jar:/home/dulin/arrow/out/soong/.intermediates/prebuilts/sdk/current/androidx/androidx.viewpager2_viewpager2/android_common/turbine-combined/androidx.viewpager2_viewpager2.jar:/home/dulin/arrow/out/soong/.intermediates/prebuilts/sdk/current/androidx-legacy/androidx.legacy_legacy-support-v4/android_common/turbine-combined/androidx.legacy_legacy-support-v4.jar:/home/dulin/arrow/out/soong/.intermediates/prebuilts/sdk/current/androidx/androidx.recyclerview_recyclerview/android_common/turbine-combined/androidx.recyclerview_recyclerview.jar:/home/dulin/arrow/out/soong/.intermediates/prebuilts/sdk/current/androidx/androidx.preference_preference/android_common/turbine-combined/androidx.preference_preference.jar:/home/dulin/arrow/out/soong/.intermediates/prebuilts/sdk/current/androidx/androidx.appcompat_appcompat/android_common/turbine-combined/androidx.appcompat_appcompat.jar:/home/dulin/arrow/out/soong/.intermediates/prebuilts/sdk/current/androidx/androidx.concurrent_concurrent-futures/android_common/turbine-combined/androidx.concurrent_concurrent-futures.jar:/home/dulin/arrow/out/soong/.intermediates/prebuilts/sdk/current/androidx/androidx.mediarouter_mediarouter/android_common/turbine-combined/androidx.mediarouter_mediarouter.jar:/home/dulin/arrow/out/soong/.intermediates/prebuilts/sdk/current/androidx/androidx.palette_palette/android_common/turbine-combined/androidx.palette_palette.jar:/home/dulin/arrow/out/soong/.intermediates/prebuilts/sdk/current/androidx-legacy/androidx.legacy_legacy-preference-v14/android_common/turbine-combined/androidx.legacy_legacy-preference-v14.jar:/home/dulin/arrow/out/soong/.intermediates/prebuilts/sdk/current/androidx/androidx.leanback_leanback/android_common/turbine-combined/androidx.leanback_leanback.jar:/home/dulin/arrow/out/soong/.intermediates/prebuilts/sdk/current/androidx/androidx.slice_slice-core/android_common/turbine-combined/androidx.slice_slice-core.jar:/home/dulin/arrow/out/soong/.intermediates/prebuilts/sdk/current/androidx/androidx.slice_slice-view/android_common/turbine-combined/androidx.slice_slice-view.jar:/home/dulin/arrow/out/soong/.intermediates/prebuilts/sdk/current/androidx/androidx.slice_slice-builders/android_common/turbine-combined/androidx.slice_slice-builders.jar:/home/dulin/arrow/out/soong/.intermediates/prebuilts/sdk/current/androidx/androidx.arch.core_core-runtime/android_common/turbine-combined/androidx.arch.core_core-runtime.jar:/home/dulin/arrow/out/soong/.intermediates/prebuilts/sdk/current/androidx-legacy/androidx.lifecycle_lifecycle-extensions/android_common/turbine-combined/androidx.lifecycle_lifecycle-extensions.jar:/home/dulin/arrow/out/soong/.intermediates/prebuilts/sdk/current/androidx/androidx.dynamicanimation_dynamicanimation/android_common/turbine-combined/androidx.dynamicanimation_dynamicanimation.jar:/home/dulin/arrow/out/soong/.intermediates/prebuilts/sdk/current/extras/constraint-layout-x/androidx-constraintlayout_constraintlayout/android_common/turbine-combined/androidx-constraintlayout_constraintlayout.jar:/home/dulin/arrow/out/soong/.intermediates/prebuilts/sdk/current/androidx/androidx.exifinterface_exifinterface/android_common/turbine-combined/androidx.exifinterface_exifinterface.jar:/home/dulin/arrow/out/soong/.intermediates/external/kotlinx.coroutines/kotlinx_coroutines_android/android_common/turbine-combined/kotlinx_coroutines_android.jar:/home/dulin/arrow/out/soong/.intermediates/external/kotlinx.coroutines/kotlinx_coroutines/android_common/turbine-combined/kotlinx_coroutines.jar:/home/dulin/arrow/out/soong/.intermediates/frameworks/libs/systemui/iconloaderlib/iconloader_base/android_common/turbine-combined/iconloader_base.jar:/home/dulin/arrow/out/soong/.intermediates/frameworks/base/packages/SystemUI/SystemUI-tags/android_common/turbine-combined/SystemUI-tags.jar:/home/dulin/arrow/out/soong/.intermediates/frameworks/base/packages/SystemUI/SystemUI-proto/android_common/turbine-combined/SystemUI-proto.jar:/home/dulin/arrow/out/soong/.intermediates/frameworks/base/packages/SystemUI/monet/monet/android_common/turbine-combined/monet.jar:/home/dulin/arrow/out/soong/.intermediates/external/dagger2/dagger2/android_common/turbine-combined/dagger2.jar:/home/dulin/arrow/out/soong/.intermediates/external/jsr330/jsr330/android_common/turbine-combined/jsr330.jar:/home/dulin/arrow/out/soong/.intermediates/external/lottie/lottie/android_common/turbine-combined/lottie.jar:/home/dulin/arrow/out/soong/.intermediates/external/kotlinc/kotlin-stdlib/android_common/combined/kotlin-stdlib.jar:/home/dulin/arrow/out/soong/.intermediates/external/kotlinc/kotlin-stdlib-jdk7/android_common/combined/kotlin-stdlib-jdk7.jar:/home/dulin/arrow/out/soong/.intermediates/external/kotlinc/kotlin-stdlib-jdk8/android_common/combined/kotlin-stdlib-jdk8.jar:/home/dulin/arrow/out/soong/.intermediates/external/kotlinc/kotlin-annotations/android_common/combined/kotlin-annotations.jar" --name "frameworks__base__packages__SystemUI__android_common__SystemUI-core" --srcs "/home/dulin/arrow/out/soong/.intermediates/frameworks/base/packages/SystemUI/SystemUI-core/android_common/kapt/kapt-sources.jar.rsp" --srcs "/home/dulin/arrow/out/soong/.intermediates/frameworks/base/packages/SystemUI/SystemUI-core/android_common/kapt/srcJars/list" --out "/home/dulin/arrow/out/soong/.intermediates/frameworks/base/packages/SystemUI/SystemUI-core/android_common/kapt/build.xml" && external/kotlinc/bin/kotlinc -J--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED -J--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED -J--add-exports=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED -J--add-opens=java.base/sun.net.www.protocol.jar=ALL-UNNAMED -J--add-opens=java.base/java.util=ALL-UNNAMED -J-Xmx1024M -Xjvm-default=enable -Xuse-ir -no-stdlib -no-jdk -Xplugin=external/kotlinc/lib/kotlin-annotation-processing.jar -P plugin:org.jetbrains.kotlin.kapt3:sources=/home/dulin/arrow/out/soong/.intermediates/frameworks/base/packages/SystemUI/SystemUI-core/android_common/kapt/gen/sources -P plugin:org.jetbrains.kotlin.kapt3:classes=/home/dulin/arrow/out/soong/.intermediates/frameworks/base/packages/SystemUI/SystemUI-core/android_common/kapt/gen/classes -P plugin:org.jetbrains.kotlin.kapt3:stubs=/home/dulin/arrow/out/soong/.intermediates/frameworks/base/packages/SystemUI/SystemUI-core/android_common/kapt/gen/stubs -P plugin:org.jetbrains.kotlin.kapt3:correctErrorTypes=true -P plugin:org.jetbrains.kotlin.kapt3:aptMode=stubsAndApt -P plugin:org.jetbrains.kotlin.kapt3:javacArguments=rO0ABXcgAAAAAgAHLXNvdXJjZQADMS45AActdGFyZ2V0AAMxLjk= -P plugin:org.jetbrains.kotlin.kapt3:apclasspath=/home/dulin/arrow/out/soong/.intermediates/external/dagger2/dagger2-compiler/linux_glibc_common/withres/dagger2-compiler.jar -P plugin:org.jetbrains.kotlin.kapt3:processors=dagger.internal.codegen.ComponentProcessor -Xbuild-file=/home/dulin/arrow/out/soong/.intermediates/frameworks/base/packages/SystemUI/SystemUI-core/android_common/kapt/build.xml && /home/dulin/arrow/out/soong/host/linux-x86/bin/soong_zip -jar -o /home/dulin/arrow/out/soong/.intermediates/frameworks/base/packages/SystemUI/SystemUI-core/android_common/kapt/kapt-sources.jar -C /home/dulin/arrow/out/soong/.intermediates/frameworks/base/packages/SystemUI/SystemUI-core/android_common/kapt/gen/sources -D /home/dulin/arrow/out/soong/.intermediates/frameworks/base/packages/SystemUI/SystemUI-core/android_common/kapt/gen/sources && /home/dulin/arrow/out/soong/host/linux-x86/bin/soong_zip -jar -o /home/dulin/arrow/out/soong/.intermediates/frameworks/base/packages/SystemUI/SystemUI-core/android_common/kapt/kapt-res.jar -C /home/dulin/arrow/out/soong/.intermediates/frameworks/base/packages/SystemUI/SystemUI-core/android_common/kapt/gen/classes -D /home/dulin/arrow/out/soong/.intermediates/frameworks/base/packages/SystemUI/SystemUI-core/android_common/kapt/gen/classes && rm -rf "/home/dulin/arrow/out/soong/.intermediates/frameworks/base/packages/SystemUI/SystemUI-core/android_common/kapt/srcJars"
Output:
WARN: The registry key 'java.correct.class.type.by.place.resolve.scope' accessed, but not loaded yet
warning: some JAR files in the classpath have the Kotlin Runtime library bundled into them. This may cause difficult to debug problems if there's a different version of the Kotlin Runtime library in the classpath. Consider removing these libraries from the classpath
out/soong/.intermediates/external/kotlinx.coroutines/kotlinx_coroutines/android_common/turbine-combined/kotlinx_coroutines.jar: warning: library has Kotlin runtime bundled into it
out/soong/.intermediates/external/kotlinx.coroutines/kotlinx_coroutines_android/android_common/turbine-combined/kotlinx_coroutines_android.jar: warning: library has Kotlin runtime bundled into it
out/soong/.intermediates/external/lottie/lottie/android_common/turbine-combined/lottie.jar: warning: library has Kotlin runtime bundled into it
out/soong/.intermediates/frameworks/base/libs/WindowManager/Shell/WindowManager-Shell/android_common/combined/WindowManager-Shell.jar: warning: library has Kotlin runtime bundled into it
out/soong/.intermediates/frameworks/base/packages/SettingsLib/SettingsLib/android_common/turbine-combined/SettingsLib.jar: warning: library has Kotlin runtime bundled into it
out/soong/.intermediates/frameworks/base/packages/SystemUI/animation/SystemUIAnimationLib/android_common/turbine-combined/SystemUIAnimationLib.jar: warning: library has Kotlin runtime bundled into it
out/soong/.intermediates/frameworks/base/packages/SystemUI/monet/monet/android_common/turbine-combined/monet.jar: warning: library has Kotlin runtime bundled into it
out/soong/.intermediates/frameworks/base/packages/SystemUI/plugin/SystemUIPluginLib/android_common/turbine-combined/SystemUIPluginLib.jar: warning: library has Kotlin runtime bundled into it
out/soong/.intermediates/frameworks/base/packages/SystemUI/shared/SystemUISharedLib/android_common/turbine-combined/SystemUISharedLib.jar: warning: library has Kotlin runtime bundled into it
exception: java.lang.IllegalStateException: failed to analyze: java.lang.OutOfMemoryError: Java heap space
at org.jetbrains.kotlin.analyzer.AnalysisResult.throwIfError(AnalysisResult.kt:56)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.compileModules$cli(KotlinToJVMBytecodeCompiler.kt:193)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinToJVMBytecodeCompiler.compileModules$cli$default(KotlinToJVMBytecodeCompiler.kt:154)
at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:169)
at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.doExecute(K2JVMCompiler.kt:52)
at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:88)
at org.jetbrains.kotlin.cli.common.CLICompiler.execImpl(CLICompiler.kt:44)
at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:98)
at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:76)
at org.jetbrains.kotlin.cli.common.CLITool.exec(CLITool.kt:45)
at org.jetbrains.kotlin.cli.common.CLITool$Companion.doMainNoExit(CLITool.kt:227)
at org.jetbrains.kotlin.cli.common.CLITool$Companion.doMainNoExit$default(CLITool.kt:222)
at org.jetbrains.kotlin.cli.common.CLITool$Companion.doMain(CLITool.kt:214)
at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler$Companion.main(K2JVMCompiler.kt:271)
at org.jetbrains.kotlin.cli.jvm.K2JVMCompiler.main(K2JVMCompiler.kt)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.jetbrains.kotlin.preloading.Preloader.run(Preloader.java:87)
at org.jetbrains.kotlin.preloading.Preloader.main(Preloader.java:44)
Caused by: java.lang.OutOfMemoryError: Java heap space
at jdk.compiler/com.sun.tools.javac.code.Scope$ScopeImpl$$Lambda$533/0x00000001007f4c40.get$Lambda(Unknown Source)
at java.base/java.lang.invoke.DirectMethodHandle$Holder.invokeStatic(DirectMethodHandle$Holder)
at java.base/java.lang.invoke.Invokers$Holder.linkToTargetMethod(Invokers$Holder)
at jdk.compiler/com.sun.tools.javac.code.Scope$ScopeImpl.getSymbolsByName(Scope.java:629)
at jdk.compiler/com.sun.tools.javac.code.Scope.getSymbolsByName(Scope.java:106)
at jdk.compiler/com.sun.tools.javac.code.Scope.getSymbolsByName(Scope.java:92)
at jdk.compiler/com.sun.tools.javac.comp.Check.checkTransparentVar(Check.java:344)
at jdk.compiler/com.sun.tools.javac.comp.MemberEnter.visitVarDef(MemberEnter.java:299)
at jdk.compiler/com.sun.tools.javac.tree.JCTree$JCVariableDecl.accept(JCTree.java:956)
at jdk.compiler/com.sun.tools.javac.comp.MemberEnter.memberEnter(MemberEnter.java:163)
at jdk.compiler/com.sun.tools.javac.comp.MemberEnter.memberEnter(MemberEnter.java:175)
at jdk.compiler/com.sun.tools.javac.comp.TypeEnter$MembersPhase.finishClass(TypeEnter.java:958)
at jdk.compiler/com.sun.tools.javac.comp.TypeEnter$MembersPhase.runPhase(TypeEnter.java:942)
at jdk.compiler/com.sun.tools.javac.comp.TypeEnter$Phase.doCompleteEnvs(TypeEnter.java:282)
at jdk.compiler/com.sun.tools.javac.comp.TypeEnter$MembersPhase.doCompleteEnvs(TypeEnter.java:877)
at jdk.compiler/com.sun.tools.javac.comp.TypeEnter$Phase.completeEnvs(TypeEnter.java:251)
at jdk.compiler/com.sun.tools.javac.comp.TypeEnter$Phase.completeEnvs(TypeEnter.java:266)
at jdk.compiler/com.sun.tools.javac.comp.TypeEnter$Phase.completeEnvs(TypeEnter.java:266)
at jdk.compiler/com.sun.tools.javac.comp.TypeEnter$Phase.completeEnvs(TypeEnter.java:266)
at jdk.compiler/com.sun.tools.javac.comp.TypeEnter.complete(TypeEnter.java:198)
at jdk.compiler/com.sun.tools.javac.code.Symbol.complete(Symbol.java:642)
at jdk.compiler/com.sun.tools.javac.code.Symbol$ClassSymbol.complete(Symbol.java:1326)
at jdk.compiler/com.sun.tools.javac.comp.Enter.complete(Enter.java:583)
at jdk.compiler/com.sun.tools.javac.comp.Enter.main(Enter.java:560)
at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.enterTrees(JavaCompiler.java:1066)
at org.jetbrains.kotlin.kapt3.base.AnnotationProcessingKt.doAnnotationProcessing(annotationProcessing.kt:74)
at org.jetbrains.kotlin.kapt3.base.AnnotationProcessingKt.doAnnotationProcessing$default(annotationProcessing.kt:31)
at org.jetbrains.kotlin.kapt3.AbstractKapt3Extension.runAnnotationProcessing(Kapt3Extension.kt:229)
at org.jetbrains.kotlin.kapt3.AbstractKapt3Extension.analysisCompleted(Kapt3Extension.kt:192)
at org.jetbrains.kotlin.kapt3.ClasspathBasedKapt3Extension.analysisCompleted(Kapt3Extension.kt:100)
at org.jetbrains.kotlin.cli.jvm.compiler.TopDownAnalyzerFacadeForJVM.analyzeFilesWithJavaIntegration$invokeExtensionsOnAnalysisComplete(TopDownAnalyzerFacadeForJVM.kt:108)
at org.jetbrains.kotlin.cli.jvm.compiler.TopDownAnalyzerFacadeForJVM.analyzeFilesWithJavaIntegration(TopDownAnalyzerFacadeForJVM.kt:118)