2011-12-05 101 views
1

可以任何一種排序代碼中的問題..「構造函數CCSprite(字符串)不可見」。所有必需的導入已導入,我已經評論了指定的錯誤在哪裏它是討厭我。在此先感謝android代碼不適用於精靈表

public class Sprite extends CCLayer{ 
    CCSprite mSprite;  

    protected Sprite() { 
     super(); 
     CGSize winSize = CCDirector.sharedDirector().winSize();  
     mSprite =new CCSprite("sprite.png");//Error:The constructor CCSprite(String) is not visible 
     mSprite.setPosition(CGPoint.ccp(mSprite.getContentSize().width/2.0f, mSprite.getContentSize().height/2.0f)); 
     addChild(mSprite); 
    } 

} 

回答

0

異常消息告訴您,您在此處調用的構造函數不可見,即它是私有的或具有包可見性。你確定你看到的來源是你打來的來源嗎?

+0

現在我該如何擺脫這個爛攤子。 – Itian