Firefly Open Source Community

   Login   |   Register   |
New_Topic

Ubuntu16.04 complie Android6.0 problem solve , step

704

Credits

10

Prestige

10

Contribution

advanced

Rank: 4

Credits
704
Posted at 3/21/2017 09:55:49     
Last edited by leung先森 In 3/21/2017 10:05 Editor

Firstly follow officail wiki to build ubuntu14.04 environment.
New 16.04 apt source cannot provide openjdk-7 ,add up a source

sudo add-apt-repository ppa: openjdk-r/ppa    ###behind colon no need space
sudo apt-get update
sudo apt-get install openjdk-7-jdk

After installed , check the version of jdk present
sudo update-alternatives --config java
sudo update-alternatives --config javac

-------------------------------------------------
Android complie
error occure:
clang: error: linker command failed with exit code 1 (use -v to see invocation)
build/core/host_shared_library_internal.mk:51: recipe for target 'out/host/linux-x86/obj32/lib/libart.so' failed
make: *** [out/host/linux-x86/obj32/lib/libart.so] Error 1


reason:ubuntu16.04 clang problem

1.Off clang,gedit file art/build/Android.common_build.mk ,find out WITHOUT_HOST_CLANG
diff:
# Host.
ART_HOST_CLANG := false
ifneq ($(WITHOUT_HOST_CLANG),true)
# By default, host builds use clang for better warnings.
- ART_HOST_CLANG := true+ ART_HOST_CLANG := false
endif

2. rebuild env
sudo apt install git-core gnupg flex bison gperf build-essentialzip \
curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386lib32ncurses5-dev \
x11proto-core-dev libx11-dev lib32z-dev ccache libgl1-mesa-dev \
libxml2-utils xsltproc unzip m4  && sudo apt-get update

No need to make clean, continue make again .


Reply

Use props Report

You need to log in before you can reply Login | Register

This forum Credits Rules

Quick Reply Back to top Back to list