1、NDK error: GLES2/gl2.h: No such file or directory
解决方法:主要是NDK默认的Android版本还不支持GLES2导致的,所以要在Application.mk文件中指定Android的版本,比如使用9:
APP_PLATFORM := android-9
2、临时解决密码框输入框问题
// input text property
void CCTextFieldTTF::setString(const char *text)
{
CC_SAFE_DELETE(m_pInputText);
if (text)
{
m_pInputText = new std::string(text);
}
else
{
m_pInputText = new std::string;
}
// if there is no input text, display placeholder instead
if (! m_pInputText->length())
{
CCLabelTTF::setString(m_pPlaceHolder->c_str());
}
else
{
//begin code modification
if (mIsPassword)
{
int length = _calcCharCount(m_pInputText->c_str());
std::string passwordText;
fillWithStars(passwordText, length);
CCLabelTTF::setString(passwordText.c_str());
}
else
{
CCLabelTTF::setString(m_pInputText->c_str());
}
//end code modification
}
m_nCharCount = _calcCharCount(m_pInputText->c_str());
}