undefined reference to '__android_log_print'.

The issue about compiling frameworks/opt/cmdjni is: undefined reference to '__android_log_print'.

This error message is produced when make a clean build, then stops building.

The reason is __android_log_print requires NDK build environment, where liblog is already created. However we are under the android source build environment with a clean building, the liblog is not created yet!

Solution is we build the liblog and libutils manually before cmdjni!

Step1: make liblog
Step2: make libutils
Step3: cd frameworks/opt/cmdjni; mm.  OR simply make

Reference:
http://mobile.51cto.com/android-267538_2.htm
http://www.2cto.com/kf/201303/195855.html

There should be better solution to support the clean building automatically.

你可能感兴趣的:(reference)