If you are using Mac OS X 10.5.8 Leopard like I do and you have synchronized the Android source code from the Android Open Source Project, you probably found that you will get a code building break message as the followings:
This is because the flex version in the Android source code is been upgraded to 2.5.4a and it causes some errors when trying to find the lex() function in CSSParser. To solve the problem, you can use MacPort 1.8 to install a flex verison then use that flex to replace the version in the Android source code. The commands would be:
For more information, check this issue in the Android bug base.
So far I have successfully build my code on my 15.4" MacBook Pro. If you also meet the issue, you can give it a try.