[Excerpt] Notes for compiling Android froyo in Ubuntu 10.10

Source: Internet
Author: User




WeekendSystemUpgrade to 10.10. First of all, I would like to express my appreciation for the rapid development of ubuntu on the UI. Many details are well done, especially for fonts.Effect.
Go to the subject and find that, as the system is upgraded,AndroidCompileThe conditions have become quite harsh. If you simply follow the compilation method of the old version, it seems that it will easily hit the wall. From last night till now, I have reinstalled the system twice (four times since the last year of last year when I started to install a new power system =), thanks to the newEnvironmentCompile froyo.
First, for the new version of ubuntu, it is best to use 64-bit, compile in a 32-bit environment, and report errors in the check stage. It was because I installed a 32-bit system, and the result was never successful, so I had to stay overnight.DownloadThe 64-bit system is installed with a cup.

1 . Warning **************************************** ********************
2 . Warning you are attempting to build on 32 - Bit System .
3 . Warning only 64 - Bit build environments are supported beyond froyo / 2.2 .
4 . Warning **************************************** ********************

If it must be compiled in a 32-bit environment Solution I tried the solution, but it was not successful.
Second, the compiler version should also be noted, that is, GCC and G ++. At the beginning, I had been installing version 4.4. The results showed that many Code Compilation failed. At first, I did not pay attention to it. I modified and reviewed C/C ++ =, but after all, it was not a solution. I always reported some nondescribedomains' low-level errors. It is estimated that the compiler version is the problem. The new version of the compiler is more rigorous in code parsing. Later, I switched back to version 4.3.
If 4.4 is installed, you can create a link after 4.3 is installed. 1 . CD / USR / Bin
2 . Ln - S gcc - 4.3 Gcc
3 . Ln - S G ++- 4.3 G ++

Next, the SDK compilation toolkit is necessary. If you use a 32-bit compilation toolkit completely, you will find that many necessary libs are missing during the compilation process, and an error similar to cannot find-LXXX occurs. Because related libs are missing
We recommend that you add these two things when apt-Get install: G++-Multilib g++-4.3-Multilib

Or directly copy this = Sudo Apt - Get install git - Core GnuPG flex bison gperf build - Essential zip curl zlib1g - Dev gcc - Multilib g ++- Multilib libc6 - Dev - I386 lib32ncurses5 - Dev ia32 - Libs x11proto - Core - Dev libx11 - Dev lib32readline5 - Dev lib32z - Dev Java - Common unixodbc

And,JavaIn the JDK version, Android only supports JDK 1.5. Currently, froyo seems to support JDK 1.6, but it does not support JDK 1.5, during the check phase during compilation, an error is reported. JDK 1.6 is required. So, pay attention during compilation. Since 1.6 is allowed, do not struggle on 1.5. hoho ~

Finally, after preparing for the above, make it and think that you can watch TV and drink tea or something. As a result, I am given such an error:
Build/CORE/base_rules.mk: 128: *** Dalvik/libcore: module. Target. java_libraries.core already defined by libcore. Stop.
There is a solution on the Internet. Please click here. I didn't try it. synchronization is too expensive.TimeCome on, I will directly find row 128th of base_rules.mk and comment it! Like this: #$ (Error $ (local_path): $ (module_id) already defined by $ (module_id )))

It must be declared that this is only very difficult to handle in many cases. If no error is reported in this location, you do not need to modify the sourceFile.
In fact, I think that in the check tools stage, many modules and tools need to be verified, for example, what system is 32-bit or 64-bit, JDK version, etc, if a tool fails to meet the requirements, an error is reported. We can try to comment out this verification condition and skip the detection of this tool. This kind of detection should be, I am talking about it, just a verification mechanism provided to ensure secure and successful compilation. It is required, but not necessary, in some extraordinary situations, we can handle this very well.

The above is my experience in 10.10. I hope it will be helpful to everyone. If anything is wrong, please make a bold correction. Thank you!


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.