Compile the android source code in the shared folder of Virtual Box.

Some weird choices will bring weird problems, such as syncing the android source code to a shared folder, and then compiling the android source code in this folder.

 

Problem: Using make -jx (x > 1) under SharedFolder causes the virtual machine to hang up much more likely than compiling under non-SharedFolder. Basically cause it to fail to compile.

Solution: honestly make -j1

 

Problem: make prompts that the .Trashes directory does not have write permission.

Analysis: I checked it with ll in the linux virtual machine, the folder belongs to the vboxsf user group, and the current user does belong to this group, and the permissions of the directory clearly have RW. After cd into .Trashes, use ll to clearly inform that there is no read permission, blah blah blah. . . .

But after thinking about it, I immediately understood that the .Trashes directory was created when the disk was created in the Mac, not in the linux box. The right to interpret the permissions is in the OSX outside.

Solution: Go back to OSX to find the .Trashes directory of this SharedFolder, and execute chmod -R 777 .Trashes to get the Trashes permission problem.

 

Problem: make prompts that a certain java .tmp file cannot be read.

Analysis: The specific reason is not analyzed, because it is no problem to read directly through the shell. It can only be guessed that VB is implementing the SharedFolder itself.

Solution: Solve by resetting the out directory compiled by android to a non-SharedFolder directory in ubuntu. The specific command is:

export OUT_DIR_COMMON_BASE=<path-to-your-out-directory>

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=327106339&siteId=291194637