Ubuntu10.10 several notes for Androidfroyo Compilation

Source: Internet
Author: User
Upgrade the system to Ubuntu10.10. First of all, I would like to express my appreciation for the rapid development of Ubuntu's UI. Many details have been done well, especially the optimization of the font effect. I found that with the upgrade of the system, the Android compilation conditions became 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 to 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 Froyo compilation in the new environment. First,

Upgrade the system to Ubuntu 10.10. First of all, I would like to express my appreciation for the rapid development of Ubuntu on the UI. Many details have been done well, especially the optimization of the font effect.

I found that with the upgrade of the system, the Android compilation conditions became quite harsh. If you simply follow the compilation and translation methods of the old version, it seems very easy to hit the wall. From last night to 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 Froyo compilation in the new environment.

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. I installed a 32-bit system, but the result was never successful. I had to download the 64-bit system overnight.

Warning *************************************** *********************
Warning You are attempting to build on a 32-bit system.
Warning Only 64-bit build environments are supported beyond froyo/2.2.
Warning *************************************** *********************

Copy code

If it is necessary to compile in a 32-bit environment, there is also a solution on the Internet. I tried it, 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. As a result, many codes were not compiled during compilation. 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.
Cd/usr/bin
Ln-s gcc-4.3 gcc
Ln-s g ++-4.3g ++
Copy code

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
Copy code
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
Copy code

In addition, in the Java JDK version, android only supports JDK 1.5. Currently, Froyo does not support JDK 1.6, 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 you can watch TV and drink tea or something. The result of www.linuxidc.com gives me an error:
Build/core/base_rules.mk: 128: *** dalvik/libcore: MODULE. TARGET. JAVA_LIBRARIES.core already defined by libcore. Stop.
If you have a solution on the internet, please click here. I didn't try it. synchronization is too time consuming. I will directly find line 128th of base_rules.mk and use # To comment it out! Like this: # $ (error $ (LOCAL_PATH): $ (module_id) already defined by $ (module_id )))
Copy code


It must be declared that this is only very difficult to handle in many cases. If no error is reported in this place, you do not need to modify the source file.
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.