Building android source code

前端 未结 4 575
不思量自难忘°
不思量自难忘° 2021-01-16 12:53

I downloaded android source from source.android.com and followed the instruction to setup build environment on MAC OS X, Everything went fine except when i run make it gives

4条回答
  •  庸人自扰
    2021-01-16 13:30

    I finally figured out the problem. There's an error in the sourcecode of frameworks/base/include/utils/KeyedVector.h:193

    Some of the member functions require Scope resolution operator "this->" to build the android source on MAC OS X Lion with xcode 4.3.x and on gcc version 4.9.2 (Debian 4.9.2-10). Without scope resolution operator compiler will not be able to identify the existence of the function.

    Open frameworks/base/include/utils/KeyedVector.h

    Change the line 193 from:

    ssize_t i = indexOfKey(key);
    

    to

    ssize_t i = this->indexOfKey(key);
    

    and Android 4.0.1 compiles.

提交回复
热议问题