Recently, I flashed an Ubuntu system on a previously eliminated notebook, compiled the source code of android-8.0.0_r17 (https://android.googlesource.com/platform/manifest-b android-8.0.0_r17) on it, and related The problem is recorded.
Configuration: memory: 3G, CPU: two cores, main frequency: 2.0GHz. The configuration is low.
Since the memory is too small, the swap area should be set larger, refer to https://blog.csdn.net/qui910/article/details/123496568.
step
source build/envsetup.sh
lunch
to select combo, select the serial number of aosp_arm-eng
make
emulator
Specific issues
1、 Assertion `cnt < (sizeof (_nl_value_type_LC_TIME) / sizeof (_nl_value_type_LC_TIME[0]))’ failed . Aborted?
解决:export LC_ALL=C,然后接着make
2、 Try increasing heap size with java option ‘-Xmx’?
解决:export JACK_SERVER_VM_ARGUMENTS=“-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx3g”
./prebuilts/sdk/tools/jack-admin kill-server
./prebuilts/sdk/tools/jack-admin start-server
然后接着make
3. FAILED: out/target/common/obj/JAVA_LIBRARIES/framework_intermediates/with-local/classes.dex
The computer stuck here once, and the progress has not changed.
Solution: Change the size of the swap area again, and then make
4. FAILED: out/soong/build.ninja
out/soong/.bootstrap/bin/soong_build -t -b out/soong -d out/soong/build.ninja.d -o out/soong/build.ninja Android.bp
Killed
Solution: Found that swap is disabled, restart it, and then make
5. Sometimes when you find that the progress is stuck, press
Ctrl+c to interrupt the compilation. kill -9 Java process (because at this time, the notebook is basically in a special stuck state, top checked and found that the Java process occupies a large amount of memory). Then check whether the swap is enabled normally, check whether the Jack service is enabled, if not, enable it, and then re-make. Before getting stuck, use the command make -j2. At this time, you can try make -j1. It is estimated that the computer configuration is too low.
6、 This application failed to start because it could not find or load the Qt platform plugin “xcb”
in “”
解决:export QT_QPA_PLATFORM_PLUGIN_PATH=/usr/lib/x86_64-linux-gnu/qt5/plugins
然后source /etc/profile一下
7、 gles2_dispatch_init: Could not load lib64GLES_V2_translator [lib64GLES_V2_translator.so: cannot open shared object file: No such file or directory]
解决:export LD_LIBRARY_PATH=./prebuilts/android-emulator/linux-x86_64/lib64
8、 libGL error: MESA-LOADER: failed to open r600 (search paths /usr/lib/x86_64-linux-gnu/dri:$${ORIGIN}/dri:/usr/lib/dri)
libGL error: failed to load driver: r600
libGL error: MESA-LOADER: failed to open r600 (search paths /usr/lib/x86_64-linux-gnu/dri:$${ORIGIN}/dri:/usr/lib/dri)
libGL error: failed to load driver: r600
libGL error: MESA-LOADER: failed to open swrast (search paths /usr/lib/x86_64-linux-gnu/dri:$${ORIGIN}/dri:/usr/lib/dri)
libGL error: failed to load driver: swrast
解决:emulator -use-system-libs
9. The black screen of starting the emulator
is not resolved. The first compilation is aosp_x86_64-eng. After the compilation is successful, the running emulator prompts that virtual technology is required. Enter the BIOS and find that it is not supported. Recompile
aosp_arm64-eng. After the compilation is successful, run the simulation The device is still a black screen. I probably remember that on the virtual machine before, the compilation is also a black screen, and then it can be started by replacing it with aosp_arm-eng. Finally, recompile aosp_arm-eng. After the compilation is
complete, the screen is still black.
After checking the information, I also tried it again, but it doesn’t work, including replacing the kernel-qemu-armv7. This problem may require a different computer.
After checking, after compiling aosp_arm-eng, the total space occupied by the folder is 115G. The out folder occupies 44G, so the downloaded source code should be 71G. Although the emulator has a black screen, but the code is compiled, put a photo of the compilation.
Put one last, as a link address for reference: https://www.jianshu.com/p/367f0886e62b