接到上回的说,主要是上回那个问题,我觉得是android的bug,黎叔觉得是cocos2dx的bug,叫我去提交bug。所以我又继续研究了下。
上回说到会调用java层的函数去创建一个image,然后作为纹理设置给精灵,在那个地方crash了,此处代码如下:
public static void createTextBitmapShadowStroke(String pString,
final String pFontName, final int pFontSize, final float fontTintR,
final float fontTintG, final float fontTintB, final int pAlignment,
final int pWidth, final int pHeight, final boolean shadow,
final float shadowDX, final float shadowDY, final float shadowBlur,
final boolean stroke, final float strokeR, final float strokeG,
final float strokeB, final float strokeSize) {
… …
final TextProperty textProperty = Cocos2dxBitmap.computeTextProperty(
pString, pWidth, pHeight, paint);
final int bitmapTotalHeight = (pHeight == 0 ? textProperty.mTotalHeight
: pHeight);
… …
final Bitmap bitmap = Bi