fhuang2020 发表于 2022-8-11 19:53:00

ITX-3568Q安卓版SDK编译报错

网盘下载的SDK第一次编译就报错:
**********************************\nYour API changes are triggering API Lint warnings or errors.\nTo make these errors go away, fix the code according to the\nerror and/or warning messages above.\n\nIf it is not possible to do so, there are workarounds:\n\n1. You can suppress the errors with @SuppressLint("<id>")\n2. You can update the baseline by executing the following\n   command:\n       cp \\\n       "'"$PWD"$'/out/soong/.intermediates/frameworks/base/api-stubs-docs/android_common/api_lint_baseline.txt" \\\n       "'"$PWD"$'/frameworks/base/api/lint-baseline.txt"\n   To submit the revised baseline.txt to the main Android\n   repository, you will need approval.\n************************************************************\n' --check-compatibility:api:released prebuilts/sdk/30/public/api/android.txt --check-compatibility:removed:released prebuilts/sdk/30/public/api/removed.txt --baseline:compatibility:released out/soong/.intermediates/prebuilts/sdk/public-api-incompatibilities-with-last-released/gen/incompatibilities.txt --update-baseline:compatibility:released out/soong/.intermediates/frameworks/base/api-stubs-docs/android_common/last_released_baseline.txt --error-message:compatibility:released $'\n******************************\nYou have tried to change the API from what has been previously released in\nan SDK.Please fix the errors listed above.\n******************************\n' && out/soong/host/linux-x86/bin/soong_zip -write_if_changed -jar -o out/soong/.intermediates/frameworks/base/api-stubs-docs/android_common/api-stubs-docs-stubs.srcjar -C out/soong/.intermediates/frameworks/base/api-stubs-docs/android_common/stubsDir -D out/soong/.intermediates/frameworks/base/api-stubs-docs/android_common/stubsDir && touch out/soong/.intermediates/frameworks/base/api-stubs-docs/android_common/api_lint.timestamp && touch out/soong/.intermediates/frameworks/base/api-stubs-docs/android_common/check_last_released_api.timestamp && rm -rf out/soong/.intermediates/frameworks/base/api-stubs-docs/android_common/srcjars
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
        at gnu.trove.TIntArrayList.<init>(TIntArrayList.java:61)
        at com.intellij.lang.impl.MarkerProduction.<init>(MarkerProduction.java:35)
        at com.intellij.lang.impl.PsiBuilderImpl.<init>(PsiBuilderImpl.java:92)
        at com.intellij.lang.impl.PsiBuilderImpl.<init>(PsiBuilderImpl.java:115)
        at com.intellij.lang.impl.PsiBuilderFactoryImpl.createBuilder(PsiBuilderFactoryImpl.java:37)
        at com.intellij.lang.java.parser.JavaParserUtil.createBuilder(JavaParserUtil.java:152)
        at com.intellij.psi.impl.source.tree.JavaElementType$ICodeBlockElementType.parseContents(JavaElementType.java:154)
        at com.intellij.psi.impl.source.tree.LazyParseableElement.lambda$ensureParsed$0(LazyParseableElement.java:206)
        at com.intellij.psi.impl.source.tree.LazyParseableElement$$Lambda$213/0x0000000100506440.run(Unknown Source)
        at com.intellij.psi.impl.DebugUtil.performPsiModification(DebugUtil.java:553)
        at com.intellij.psi.impl.source.tree.LazyParseableElement.ensureParsed(LazyParseableElement.java:205)
        at com.intellij.psi.impl.source.tree.LazyParseableElement.getFirstChildNode(LazyParseableElement.java:254)
        at com.intellij.psi.impl.source.tree.LazyParseablePsiElement.getFirstChild(LazyParseablePsiElement.java:90)
        at com.intellij.psi.impl.source.tree.LazyParseablePsiElement.acceptChildren(LazyParseablePsiElement.java:104)
        at com.intellij.psi.JavaRecursiveElementVisitor.visitElement(JavaRecursiveElementVisitor.java:43)
        at com.intellij.psi.JavaElementVisitor.visitCodeBlock(JavaElementVisitor.java:52)
        at com.intellij.psi.impl.source.tree.java.PsiCodeBlockImpl.accept(PsiCodeBlockImpl.java:212)
        at com.intellij.psi.impl.source.tree.CompositePsiElement.acceptChildren(CompositePsiElement.java:81)
        at com.intellij.psi.JavaRecursiveElementVisitor.visitElement(JavaRecursiveElementVisitor.java:43)
        at com.intellij.psi.JavaElementVisitor.visitStatement(JavaElementVisitor.java:259)
        at com.intellij.psi.JavaElementVisitor.visitBlockStatement(JavaElementVisitor.java:32)
        at com.intellij.psi.impl.source.tree.java.PsiBlockStatementImpl.accept(PsiBlockStatementImpl.java:67)
        at com.intellij.psi.impl.source.tree.CompositePsiElement.acceptChildren(CompositePsiElement.java:81)
        at com.intellij.psi.JavaRecursiveElementVisitor.visitElement(JavaRecursiveElementVisitor.java:43)
        at com.intellij.psi.JavaElementVisitor.visitStatement(JavaElementVisitor.java:259)
        at com.intellij.psi.JavaElementVisitor.visitIfStatement(JavaElementVisitor.java:120)
        at com.intellij.psi.impl.source.tree.java.PsiIfStatementImpl.accept(PsiIfStatementImpl.java:189)
        at com.intellij.psi.impl.source.tree.LazyParseablePsiElement.acceptChildren(LazyParseablePsiElement.java:106)
        at com.intellij.psi.JavaRecursiveElementVisitor.visitElement(JavaRecursiveElementVisitor.java:43)
        at com.intellij.psi.JavaElementVisitor.visitCodeBlock(JavaElementVisitor.java:52)
        at com.intellij.psi.impl.source.tree.java.PsiCodeBlockImpl.accept(PsiCodeBlockImpl.java:212)
        at com.intellij.psi.impl.source.tree.CompositePsiElement.acceptChildren(CompositePsiElement.java:81)
21:42:03 ninja failed with: exit status 1

这个是什么原因导致?

fhuang2020 发表于 2022-8-11 19:56:08

第一次全编译,编译指令:./FFTools/make.sh -d rk3568-firefly-itx-3568q -j8 -l rk3568_firefly_itx_3568q-userdebug

请技术人员帮忙处理下,谢谢!

zyk 发表于 2022-8-12 09:05:27

你好,请问PC电脑的配置情况怎样

fhuang2020 发表于 2022-8-12 14:35:44

PC配置为10代I5 6核12线程,16G内存,1T硬盘,采用虚拟机编译的,CPU核心和内存采用了8G.

fhuang2020 发表于 2022-8-12 14:39:52

虚拟机分配了245G的硬盘空间,在编译报错的时候还有40多G的空间,排除空间满的问题.

zyk 发表于 2022-8-12 14:56:36

虚拟机的内存再分大一点试试

fhuang2020 发表于 2022-8-12 15:02:20

16G的内存,提示8G最大了,再大就会占用整个内存,担心操作卡住,另外1个机器只有8G内存,用了8G编译直接卡住,鼠标键盘都用不了.

zyk 发表于 2022-8-12 16:19:30

没试过8GB内存的PC编译,Android比较吃配置,建议加个内存条试试

fhuang2020 发表于 2022-8-15 11:17:41

好的,试试,多谢!
页: [1]
查看完整版本: ITX-3568Q安卓版SDK编译报错