简体   繁体   English

生成android源代码(AOSP)问题

[英]Build android source code (AOSP) issue

I try to follow tutorial for build android from his source code. 我尝试按照他的源代码构建Android教程。

I downloaded the 5.0 version of android AOSP, and all nedded libraries. 我下载了5.0版本的android AOSP,以及所有nedded库。

Open the console, open the folder of AOSP and go to build: 打开控制台,打开AOSP文件夹并进行构建:

1. . 1。 build/envsetup.sh 建立/ envsetup.sh

2. lunch (after press enter) 2.午餐(按回车后)

3. make -j16 (or 8, or 4...) 3.制作-j16(或8或4 ...)

In this point I receive a error: 在这一点上,我收到一个错误:

XXXXXX@XXXXXXXdevelop:~/androidAOSP$ make -j16
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=6.0.1
TARGET_PRODUCT=aosp_arm
TARGET_BUILD_VARIANT=eng
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a
TARGET_CPU_VARIANT=generic
TARGET_2ND_ARCH=
TARGET_2ND_ARCH_VARIANT=
TARGET_2ND_CPU_VARIANT=
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.4.0-31-generic-x86_64-with-Ubuntu-16.04-xenial
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=MASTER
OUT_DIR=out
============================================
Cannot find go tools under ./prebuilts/go/linux-x86/
build/core/soong.mk:25: fallo en las instrucciones para el objetivo 'out/soong/.soong.bootstrap'
make: *** [out/soong/.soong.bootstrap] Error 1
make: *** Se borra el archivo 'out/soong/.soong.bootstrap'

#### make failed to build some targets (1 seconds) ####

where I was wrong? 我哪里错了?

EDIT 编辑

I can solve this issue clonning the go git project in prebuild folder. 我可以通过克隆prebuild文件夹中的go git项目来解决此问题。 But I don't know why it is not preinstalled.. 但是我不知道为什么没有预装它。

Now I have a new error and I can't find info for this file in internet: 现在,我有一个新错误,并且无法在Internet中找到此文件的信息:

-env-aosp_arm.sh -env-aosp_arm.sh

The error is that not find the file: 错误是找不到文件:

Running kati to generate build-aosp_arm.ninja...
Starting build with ninja
/bin/bash: out/env-aosp_arm.sh: No existe el archivo o el directorio
build/core/ninja.mk:142: fallo en las instrucciones para el objetivo 'ninja_wrapper'
make: *** [ninja_wrapper] Error 1

#### make failed to build some targets (1 seconds) ####

Run this: 运行这个:

. build/envsetup.sh; lunch aosp_arm-eng; make -j4

This will tell your machine to - 这将告诉您的机器-

1. . build/envsetup.sh 1 . build/envsetup.sh . build/envsetup.sh - Execute environment setup for AOSP building tools . build/envsetup.sh执行AOSP构建工具的环境设置
2. lunch aosp_arm-eng - This is why your make failed , by adding aosp_arm-eng you tell the make what kind of OS to build (eg engineer/ user /user debug). 2. lunch aosp_arm-eng 这就是您制作失败的原因 ,通过添加aosp_arm-eng可以告诉make要构建哪种操作系统(例如,工程师/用户/用户调试)。
3. make -j4 - Start building + compiling 3. make -j4开始构建+编译

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM