首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用openGL和BaseGameUtils的Google服务

问使用openGL和BaseGameUtils的Google服务
EN

Stack Overflow用户
提问于 2014-06-09 13:00:23
回答 1查看 529关注 0票数 0

我正试图在一个游戏中实现Google Play Services的成就。我已经跟踪了这文档中的步骤,一切都很好,除了运行时警告,然后是挤压。警告是:

代码语言:javascript
复制
06-09 10:43:05.900: W/PopupManager(17888): You have not specified a View to use as content view for popups. Falling back to the Activity content view which may not work properly in future versions of the API. Use setViewForPopups() to set your content view.

我的应用程序正在使用openGL,该活动有一个扩展GLSurfaceView的成员mView。

我尝试过这和这 (我有所有的元标记和正确的app_id设置)。

此外,TypeANumber正确地以我的app_id开头。

有人能帮我吗?

编辑添加了一些代码

以下是活动声明:

代码语言:javascript
复制
public class GGActivity extends BaseGameActivity implements SensorEventListener, IDownloaderClient {

下面是发生问题的onCreate (在free3dom建议的更改之后):

代码语言:javascript
复制
public GGView mView;

    @Override protected void onCreate(Bundle icicle) {

        setRequestedClients(BaseGameActivity.CLIENT_GAMES | BaseGameActivity.CLIENT_APPSTATE);
        //if (DEBUG_BUILD)
        {
            enableDebugLog(true);
        }
        setContentView(mView); // make sure mView is created before
        getGameHelper().createApiClientBuilder();
        getGameHelper().getApiBuilder().setViewForPopups( mView );
        super.onCreate(icicle);

是的,setContentView帮了忙。谢谢!

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2014-06-09 19:43:58

为了让您的活动识别和使用GLSurfaceView,您必须设置它。这可以通过调用

代码语言:javascript
复制
setContentView(mView);

在创建GLSurfaceView之后(文档可以找到这里)。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/24120870

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档