九鼎创展论坛中文版English
登录 | 立即注册 设为首页收藏本站 切换到宽版
查看: 1044|回复: 1

编译时Java堆栈溢出,怎么解决

[复制链接]
发表于 2022-11-30 23:48:42 | 显示全部楼层 |阅读模式
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
        at java.base/java.util.Arrays.copyOfRange(Arrays.java:4030)
        at java.base/java.lang.StringLatin1.newString(StringLatin1.java:715)
        at java.base/java.lang.String.substring(String.java:1846)
        at java.base/java.io.File.getName(File.java:456)
        at com.intellij.openapi.vfs.local.CoreLocalVirtualFile.getName(CoreLocalVirtualFile.java:37)
        at com.intellij.openapi.vfs.VirtualFile.getNameSequence(VirtualFile.java:114)
        at com.intellij.openapi.vfs.VirtualFile.nameEquals(VirtualFile.java:676)
        at com.intellij.openapi.vfs.VirtualFile.findChild(VirtualFile.java:306)
        at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCliJavaFileManagerImpl.findVirtualFileGivenPackage(KotlinCliJavaFileManagerImpl.kt:213)
        at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCliJavaFileManagerImpl.access$findVirtualFileGivenPackage(KotlinCliJavaFileManagerImpl.kt:48)
        at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCliJavaFileManagerImpl$findClasses$1$$special$$inlined$forEachClassId$lambda$1.invoke(KotlinCliJavaFileManagerImpl.kt:164)
        at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCliJavaFileManagerImpl$findClasses$1$$special$$inlined$forEachClassId$lambda$1.invoke(KotlinCliJavaFileManagerImpl.kt:48)
        at org.jetbrains.kotlin.cli.jvm.index.JvmDependenciesIndexImpl$traverseDirectoriesInPackage$1.invoke(JvmDependenciesIndexImpl.kt:77)
        at org.jetbrains.kotlin.cli.jvm.index.JvmDependenciesIndexImpl$traverseDirectoriesInPackage$1.invoke(JvmDependenciesIndexImpl.kt:32)
        at org.jetbrains.kotlin.cli.jvm.index.JvmDependenciesIndexImpl.search(JvmDependenciesIndexImpl.kt:131)
        at org.jetbrains.kotlin.cli.jvm.index.JvmDependenciesIndexImpl.traverseDirectoriesInPackage(JvmDependenciesIndexImpl.kt:76)
        at org.jetbrains.kotlin.cli.jvm.index.JvmDependenciesIndex$DefaultImpls.traverseDirectoriesInPackage$default(JvmDependenciesIndex.kt:35)
        at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCliJavaFileManagerImpl$findClasses$1.invoke(KotlinCliJavaFileManagerImpl.kt:162)
        at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCliJavaFileManagerImpl$findClasses$1.invoke(KotlinCliJavaFileManagerImpl.kt:48)
        at org.jetbrains.kotlin.util.PerformanceCounter.time(PerformanceCounter.kt:91)
        at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCliJavaFileManagerImpl.findClasses(KotlinCliJavaFileManagerImpl.kt:158)
        at com.intellij.psi.impl.PsiElementFinderImpl.findClasses(PsiElementFinderImpl.java:44)
        at com.intellij.psi.impl.JavaPsiFacadeImpl.findClassesWithoutJvmFacade(JavaPsiFacadeImpl.java:186)
        at com.intellij.psi.impl.JavaPsiFacadeImpl.findClassesWithJvmFacade(JavaPsiFacadeImpl.java:157)
        at com.intellij.psi.impl.JavaPsiFacadeImpl.findClasses(JavaPsiFacadeImpl.java:149)
        at com.intellij.psi.impl.file.PsiPackageImpl.getCachedClassesByName(PsiPackageImpl.java:209)
        at com.intellij.psi.impl.file.PsiPackageImpl.findClassByShortName(PsiPackageImpl.java:271)
        at com.intellij.psi.impl.file.PsiPackageImpl.processDeclarations(PsiPackageImpl.java:306)
        at com.intellij.psi.impl.source.PsiJavaFileBaseImpl.processPackageDeclarations(PsiJavaFileBaseImpl.java:484)
        at com.intellij.psi.impl.source.PsiJavaFileBaseImpl.processOnDemandTarget(PsiJavaFileBaseImpl.java:494)
        at com.intellij.psi.impl.source.PsiJavaFileBaseImpl.processOnDemandTypeImports(PsiJavaFileBaseImpl.java:407)
        at com.intellij.psi.impl.source.PsiJavaFileBaseImpl.processDeclarationsNoGuess(PsiJavaFileBaseImpl.java:335)
23:02:40 ninja failed with: exit status 1

#### failed to build some targets (04:52:54 (hh:mm:ss)) ####

Build android failed!
回复

使用道具 举报

发表于 2022-12-1 09:42:29 | 显示全部楼层
进入kernel和uboot里面make clean  然后去源码根目录下删除out
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|手机版|小黑屋|深圳市九鼎创展科技官方论坛 ( 粤ICP备11028681号-2  

GMT+8, 2024-10-13 02:40 , Processed in 0.018980 second(s), 19 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表