Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试在 cocos2d 游戏中实现应用购买。我在 cocos2d 中使用扩展 CCLayer 场景()。当我点击应用内购买按钮时,付款对话框打开但我的应用程序在后端关闭。我不知道这是怎么发生的。
我认为这是由于 - finish()。可能是你在你的onPause(). 就我而言,当我点击IAP的购买按钮时,我错误地将它写在 onPause 中,总是出现对话但游戏窗口自动关闭。
finish()
onPause()
@Override public void onPause() { super.onPause(); CCDirector.sharedDirector().pause(); //finish(); }
注释掉finish()我的问题解决的方法后。:)