Android 4.0.1 source code compilation and learning error solving

Source: Internet
Author: User

The host is 2.6.ora 14 Linux kernel 2.6.35.6 Swapon swap partition 1.5g make-version 3.81 (officially designated make version) JDK 1.6

The reserved disk space must be larger than 13 Gb.

For detailed compilation steps, refer

Fedora 15 compile Android source code

Download android4.0.1 source code, compile and run the simulator

Question 1:

Out/host/common/obj/java_libraries/clearsilver_intermediates/classes) unrecognized option: 9999999 make: *** [out/host/common/obj/java_libraries/clearsilver_intermediates/javalib. jar] Error 41 solution: Install JDK and set the environment variables correctly. For details, refer to the first article listed above. Question 2: solve the problem by missing the libgl1 package: use Yum install Mesa-libgl-devel in fedora. Question 3:

Processing target/product/generic/dex_bootjars/system/framework/CORE. Jar + n s # z5 J5 E8 J/M. L) W. C (F

Host/linux-x86/bin/dexopt: Error while loading shared libraries: libdvm. So: cannot enable executable stack as shared object requires: Permission denied

Solution: the problem is that the system fedora is used. In fedora, suselinux sets some permissions by default.

Here you can run setsebool allow_execstack = 1

Question 4:

/Usr/bin/ld: Note: 'initthreads' is defined in DSO/usr/lib/libx11.so.
6 so try adding it to the linker command line
/Usr/lib/libx11.so. 6: cocould not read symbols: Invalid operation
Collect2: LD returned 1 exit status

Solution:

In the file development/tools/emulator/OpenGL/host/Renderer/Android. mk, add
Local_ldlibs + =-lx11

Question 5: out of memory or collect2: LD terminated with signal 9 [killed]

Solution: the memory usage in the subsequent compilation phase of Android is very high. If swap partition is not set, or the partition is too small, the above error will occur,

# Dd If =/dev/Zero of =/opt/other/swapfile BS = 1024 COUNT = 1536 K
# Mkswap/opt/other/swapfile
# Swapon/opt/other/swapfile
# Swapon-S
Filename type size used priority
/Opt/other/swapfile file 1572860 0-1

Question 6: ACP: file 'out/host/linux-x86/obj/executables/vm-tests_intermediates/tests/data' does not exist

Solution: create a data directory in the corresponding location (I encountered this problem during the first compilation. After solving this problem, I encountered other problems. I deleted the out directory and re-compiled it, this problem does not occur or follow-up issues)

Question 7: llvm-Rs-CC: Permission denied

Solution: You can go to the appropriate folder out/host/linux-x86/bin/Llvm-Rs-CC, View this file, even if you have all the Permissions Valid, cannot execute binary file llvm-Rs-C will appear at run, I did not find a solution, just delete the out directory, this problem does not occur after recompilation. There was no problem 6 above.

After two days, I finally prepared it. It seems that android compilation is not the same every time. It takes a long time for everyone to get a success. One texture. I wish you all success!

Problem 8: When you modify the android code, you can compile it again.
Have tried to change the API from what has been previusly approved. (frameworks/base modified)

Solution: Make Update-API

Question 9: To test a built-in application, use Mmm to compile the packages/experimental/xxx folder, and generate the APK file and XXX with the same name under generic/system/app. odx file, but this APK file cannot be directly installed, and an error occurs during installation. Logcat displays does not include classes. Dex.

Solution: 'The Android Rom contains many odex files. What is the role of this odex file relative to the DEX file in the APK? Android123 reminds you that, if you observe carefully, you will find that the file names correspond one to one, and the corresponding APK files do not contain Dex files. In this way, the vendor can ensure anti-piracy, because the APK without the DEX file cannot be installed normally, the vendor directly puts the odex and incomplete APK files in the ROM of the mobile phone to solidify them into/system/bin, which will make the general user unable to export and use them normally. 'In fact, files containing Dex can be installed in the xxx_intermediatesfolder under generic/obj/volumes. The following xx.apk.unalignedand xxx.apk. unsingned files can contain Dex.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.