Android source code compilation in ubuntu12.04 Environment

Source: Internet
Author: User

Sudo apt-Get install libncurses5-dev: i386

Reading package lists... Done
Building dependency tree
Reading state information... Done
Package libncurses5-dev: i386 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
Is only available from another source
However the following packages replace it:
Ncurses-Doc libtinfo-Dev

E: Package 'libncurses5-Dev: i386 'has no installation candidate

This problem occurs because of the use of 64-bit systems, cannot use i386, this is 32bit, the network is not successful examples, so try sudo apt-Get install libncurses5-dev: amd64 .. it can be installed, so other i386 problems can be solved in this way.

If you are setting up an environment for Android source code in 64 bits system, the official command may be wrong, use this

$ Sudo apt-Get install git GnuPG flex bison gperf build-essential \ zip curl libc6-dev libncurses5-dev: amd64 x11proto-core-dev \ libx11-dev: amd64 libreadline6-dev: amd64 libgl1-mesa-glx: amd64 \ libgl1-mesa-dev g ++-multilib mingw32 tofrodos \ Python-markdown libxml2-utils unzip tproc zlib1g-dev: amd64 $ sudo ln-S/usr/lib/x86_64-linux-gnu/MESA/libgl. so.1/usr/lib/x86_64-linux-gnu/libgl. so (note the Lib under/usr)

Java installation error

For more information, see http://www.cnblogs.com/samcn/archive/2011/03/16/1986248.htmlconfiguration. Then an error is reported. The system already comes with openjdk1.6.0 _ 27

Your version is: Java version "1.6.0 _ 27 ".

The specified correct version is: Java SE 1.6.

Solve this problem through this method:

Click Open Link

Gedit ~ /. Bashrc
Add the following description at the end of the file:
Export java_home =/usr/lib/JDK/jdk1.7.0 _ 17
Export jre_home =/usr/lib/JDK/jdk1.7.0 _ 17/JRE
Export Path = $ java_home/bin: $ java_home/JRE/bin: $ path
Export classpath = $ classpath:.: $ java_home/lib: $ java_home/JRE/lib

Synchronize:
.~ /. Bashrc

Update-alternatives -- install/usr/bin/Java/usr/lib/JDK/jdk1.7.0 _ 17/bin/Java 300

Update-alternatives -- install/usr/bin/javac/usr/lib/JDK/jdk1.7.0 _ 17/bin/javac 300

Confirm the path:
Printenv java_home

Java-version
Print:
Java version "1.7.0 _ 17"
Java (TM) se Runtime Environment (build 1.7.0 _ 17-b02)
Java hotspot (TM) server VM (build 23.7-b01, mixed mode)

Cocould not create the Java Virtual Machine.

Header: Out/target/product/rk30sdk/obj/include/libwpa_client/wpa_ctrl.h
Make: *** [out/host/common/obj/java_libraries/jsr305lib_intermediates/javalib. jar] Error 41
Make: *** waiting for unfinished jobs ....
Import into des file: Out/host/linux-x86/obj/static_libraries/libhost_intermediates/import_includes

This is because the Java execution program is correctly configured.

Http://paddy-w.iteye.com/blog/958062

Http://developer.51cto.com/art/200906/129515.htm

Continue compilation and find the following errors

Libz. so.1 not found

After analysis in this section, is the lack of lib32z1-dev library, installation can be.

The analysis process is as follows for your reference only:

Refference link:

This websit is good for learning)

1. Check which software package provides the library file.
Open the/usr/lib directory when you are idle (because I know that some library files are stored in this directory, which can be used by our developers) and want to see which libraries are in my system.
You can see a libz. So file, and run the following command to view it:

Dpkg-S/usr/lib/libz. So

This command outputs the following information:

Zlib1g-dev:/usr/lib/libz. So

That is, the software package zlib1g-dev in my system provides the libz. So library file.
2. view the detailed information of the software package.
You can run the following command to check what the software package is doing:

Apt-Cache show zlib1g-dev

Part of the output content is:

Description: compression library-development
Zlib is a library implementing the deflate compression method found
In gzip and PKZIP. This package includes des the development support
Files.
Bugs: mailto: ubuntu-users@lists.ubuntu.com
Origin: Ubuntu

Obviously, this software package provides things related to gzip and PKZIP compression algorithms.

Continue to view the details of the zlib1g-dev package with the following command:
Dpkg-l zlib1g-dev

10.04 analysis result of normal version installation

Dpkg-s libz. So

Result:
Lib32z1-dev:/usr/lib32/libz. So
Zlib1g:/lib/libz. so.1.2.3.3
Lib32z1:/usr/lib32/libz. so.1
Lib32z1:/usr/lib32/libz. so.1.2.3.3
Zlib1g-dev:/usr/lib/libz. So
Zlib1g:/lib/libz. so.1

12.04 analysis results of installation errors

Locate-B 'libz. So *'
// Lib/x86_64-linux-gnu/libz. so.1
/Lib/x86_64-linux-gnu/libz. so.1.2.3.4
/Usr/lib/libz. so.1
/Usr/lib/x86_64-linux-gnu/libz. So

Server:/$ dpkg-s libz. So
Zlib1g:/lib/x86_64-linux-gnu/libz. so.1.2.3.4
Zlib1g:/lib/x86_64-linux-gnu/libz. so.1

After installing the lib32z1-dev according to 10.04

Server:/$ dpkg-s libz. So
Lib32z1-dev:/usr/lib32/libz. So
Lib32z1:/usr/lib32/libz. so.1
Lib32z1:/usr/lib32/libz. so.1.2.3.4
Zlib1g-dev:/usr/lib/x86_64-linux-gnu/libz. So
Zlib1g:/lib/x86_64-linux-gnu/libz. so.1.2.3.4
Zlib1g:/lib/x86_64-linux-gnu/libz. so.1

Compile again to solve the problem! Thank you, Mr. Zhou LIFA.

PS: I would like to try 1bi64z1-dev: i386, but after this is installed, I will not try it. I will give it to future generations.

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.