mac下编译安卓源码
资源
Mac OS10.12 编译Android源码8.1
aosp编译-需*
Mac下编译安卓源码
手把手教你在Mac OS下载、编译及导入Android源码
步骤
准备
磁盘空间大于180G
安装JDK
安装xcode
1。建立磁盘映像(Mac OS扩展(区分大小写,日志式))
2. 拉取代码
出现的问题
问题1
******************************
Your API changes are triggering API Lint warnings or errors.
To make these errors go away, you have two choices:
1. You can suppress the errors with @SuppressLint("<id>").
2. You can update the baseline by executing the following command:
cp "/Volumes/untitled/aosp/out/soong/.intermediates/frameworks/base/api-stubs-docs/android_common/api_lint_baseline.txt" "/Volumes/untitled/aosp/frameworks/base/api/lint-baseline.txt"
******************************
创建文件
touch “/Volumes/untitled/aosp/out/soong/.intermediates/frameworks/base/api-stubs-docs/android_common/api_lint_baseline.txt” “/Volumes/untitled/aosp/frameworks/base/api/lint-baseline.txt”
问题2
//frameworks/base:api-stubs-docs metalava API lint
//frameworks/base:api-stubs-docs metalava API lint
创建文件
touch “/Volumes/untitled/aosp/out/soong/.intermediates/frameworks/base/api-stubs-docs/android_common/api_lint_baseline.txt” “/Volumes/untitled/aosp/frameworks/base/api/lint-baseline.txt”
问题3
******************************
Your API changes are triggering API Lint warnings or errors.
To make these errors go away, you have two choices:
1. You can suppress the errors with @SuppressLint("<id>").
2. You can update the baseline by executing the following command:
cp "/Volumes/untitled/aosp/out/soong/.intermediates/frameworks/base/api-stubs-docs/android_common/api_lint_baseline.txt" "/Volumes/untitled/aosp/frameworks/base/api/lint-baseline.txt"
******************************
创建文件
touch “/Volumes/untitled/aosp/out/soong/.intermediates/frameworks/base/api-stubs-docs/android_common/api_lint_baseline.txt” “/Volumes/untitled/aosp/frameworks/base/api/lint-baseline.txt”
问题4
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
at gnu.trove.TIntArrayList.ensureCapacity(TIntArrayList.java:94)
at gnu.trove.TIntArrayList.add(TIntArrayList.java:138)
at com.intellij.lang.impl.MarkerProduction.addMarker(MarkerProduction.java:76)
at com.intellij.lang.impl.PsiBuilderImpl.mark(PsiBuilderImpl.java:816)
at com.intellij.lang.impl.PsiBuilderAdapter.mark(PsiBuilderAdapter.java:95)
at com.intellij.lang.impl.PsiBuilderAdapter.mark(PsiBuilderAdapter.java:95)
at com.intellij.lang.java.parser.ReferenceParser.parseReferenceParameterList(ReferenceParser.java:275)
at com.intellij.lang.java.parser.ReferenceParser.parseJavaCodeReference(ReferenceParser.java:263)
at com.intellij.lang.java.parser.ReferenceParser.parseTypeInfo(ReferenceParser.java:116)
at com.intellij.lang.java.parser.ReferenceParser.parseTypeInfo(ReferenceParser.java:56)
at com.intellij.lang.java.parser.DeclarationParser.parseListElement(DeclarationParser.java:603)
at com.intellij.lang.java.parser.DeclarationParser.parseParameter(DeclarationParser.java:569)
at com.intellij.lang.java.parser.DeclarationParser.parseElementList(DeclarationParser.java:522)
at com.intellij.lang.java.parser.DeclarationParser.parseParameterList(DeclarationParser.java:451)
at com.intellij.lang.java.parser.DeclarationParser.parseMethodFromLeftParenth(DeclarationParser.java:413)
at com.intellij.lang.java.parser.DeclarationParser.parse(DeclarationParser.java:369)
at com.intellij.lang.java.parser.DeclarationParser.parseClassBodyDeclarations(DeclarationParser.java:198)
at com.intellij.lang.java.parser.DeclarationParser.parseClassBodyWithBraces(DeclarationParser.java:58)
at com.intellij.lang.java.parser.DeclarationParser.parseClassFromKeyword(DeclarationParser.java:90)
at com.intellij.lang.java.parser.DeclarationParser.parse(DeclarationParser.java:262)
at com.intellij.lang.java.parser.DeclarationParser.parseClassBodyDeclarations(DeclarationParser.java:198)
at com.intellij.lang.java.parser.DeclarationParser.parseClassBodyWithBraces(DeclarationParser.java:58)
at com.intellij.lang.java.parser.DeclarationParser.parseClassFromKeyword(DeclarationParser.java:90)
at com.intellij.lang.java.parser.DeclarationParser.parse(DeclarationParser.java:262)
at com.intellij.lang.java.parser.FileParser.parseInitial(FileParser.java:99)
at com.intellij.lang.java.parser.FileParser.parseFile(FileParser.java:55)
at com.intellij.lang.java.parser.FileParser.parse(FileParser.java:34)
at com.intellij.psi.impl.source.JavaFileElementType.doParse(JavaFileElementType.java:87)
at com.intellij.psi.impl.source.JavaFileElementType.parseContents(JavaFileElementType.java:81)
at com.intellij.psi.impl.source.tree.LazyParseableElement.lambda$ensureParsed$0(LazyParseableElement.java:206)
at com.intellij.psi.impl.source.tree.LazyParseableElement$$Lambda$191/0x0000000800445840.run(Unknown Source)
at com.intellij.psi.impl.DebugUtil.performPsiModification(DebugUtil.java:553)
-e
创建文件
touch “/Volumes/untitled/aosp/out/soong/.intermediates/frameworks/base/api-stubs-docs/android_common/api_lint_baseline.txt” “/Volumes/untitled/aosp/frameworks/base/api/lint-baseline.txt”
问题5
Exception in thread "main" java.lang.OutOfMemoryError: Java heap space
at com.intellij.psi.impl.source.tree.JavaElementType$$Lambda$137/0x00000008003bc040.get(Unknown Source)
at com.intellij.psi.impl.source.tree.JavaElementType$JavaCompositeElementType.createCompositeNode(JavaElementType.java:42)
at com.intellij.lang.ASTFactory.composite(ASTFactory.java:80)
at com.intellij.lang.impl.PsiBuilderImpl.createComposite(PsiBuilderImpl.java:1285)
at com.intellij.lang.impl.PsiBuilderImpl.bind(PsiBuilderImpl.java:1203)
at com.intellij.lang.impl.PsiBuilderImpl.buildTree(PsiBuilderImpl.java:919)
at com.intellij.lang.impl.PsiBuilderImpl.getTreeBuilt(PsiBuilderImpl.java:905)
at com.intellij.psi.impl.source.JavaFileElementType.parseContents(JavaFileElementType.java:82)
at com.intellij.psi.impl.source.tree.LazyParseableElement.lambda$ensureParsed$0(LazyParseableElement.java:206)
at com.intellij.psi.impl.source.tree.LazyParseableElement$$Lambda$193/0x000000080045c840.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.CompositeElement.countChildren(CompositeElement.java:449)
at com.intellij.psi.impl.source.tree.CompositeElement.getChildrenAsPsiElements(CompositeElement.java:411)
at com.intellij.psi.impl.source.PsiJavaFileBaseImpl.getClasses(PsiJavaFileBaseImpl.java:66)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCliJavaFileManagerImpl$Companion.findClassInPsiFile(KotlinCliJavaFileManagerImpl.kt:261)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCliJavaFileManagerImpl$Companion.access$findClassInPsiFile(KotlinCliJavaFileManagerImpl.kt:257)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCliJavaFileManagerImpl.findPsiClassInVirtualFile(KotlinCliJavaFileManagerImpl.kt:227)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCliJavaFileManagerImpl.access$findPsiClassInVirtualFile(KotlinCliJavaFileManagerImpl.kt:48)
at org.jetbrains.kotlin.cli.jvm.compiler.KotlinCliJavaFileManagerImpl$findClasses$1$$special$$inlined$forEachClassId$lambda$1.invoke(KotlinCliJavaFileManagerImpl.kt:166)
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)
创建文件
touch “/Volumes/untitled/aosp/out/soong/.intermediates/frameworks/base/api-stubs-docs/android_common/api_lint_baseline.txt” “/Volumes/untitled/aosp/frameworks/base/api/lint-baseline.txt”
编译android遇到java虚拟机堆内存不够的问题
Android中编译源码提示java虚拟机内存不足
android 源码编译相关
https://www.one-tab.com/page/2i8WgfJhSYeMXp6tCbSNVA
编译出错 ninja: build stopped: subcommand failed Android 源码编译
编译出错 ninja: build stopped: subcommand failed Android 源码编译
Ubuntu14.04 Android Studio源码导入调试
使用AndroidStudio查看并调试Android源码
Filesystem Case-Sensitivity Mismatch
sudo ./development/tools/idegen/idegen.sh
本文地址:https://blog.csdn.net/AdrianAndroid/article/details/103441526