适用于Bionic 4.1.2但不适用于Samsung 4.4.2

时间:2014-10-19 21:25:54

标签: android opengl-es

我有一个我正在研究的应用程序,它在Android设备上使用openGL ES 2.0。该应用程序包含一些使用程序化布局控件显示的按钮。此按钮板叠加在OpenGL表面视图上。

当我在平板电脑上运行应用程序时,按钮出现并且Surface视图会短暂出现,但是Surface View视图是灰色的,我创建的3d模型的背景颜色。该应用适用于摩托罗拉Bionic,Android 4.1.2,但不适用于三星Galaxy Tab / Pro,Android 4.4.2!当然我希望它能兼顾两者。我搜索了一个解决方案,涉及更改实例化GL Surface View的初始Activity的哪一部分,但我现在无法在线找到该解决方案。它可能已被删除。我不知道。这是我现在看到的错误。

W/ApplicationPackageManager﹕ getCSCPackageItemText()
E/MoreInfoHPW_ViewGroup﹕ Parent view is not a TextView

下面是三星设备的日志。

10-10 14:27:03.723  30456-30462/org.android.airplane D/dalvikvm﹕ Debugger has detached; object registry had 1 entries
10-10 14:38:55.833    1269-1269/org.android.airplane I/SELinux﹕ Function: selinux_android_load_priority [0], There is no sepolicy file.
10-10 14:38:55.833    1269-1269/org.android.airplane I/SELinux﹕ Function: selinux_android_load_priority , loading version is VE=SEPF_SM-T320_4.4.2_0018
10-10 14:38:55.833    1269-1269/org.android.airplane I/SELinux﹕ selinux_android_seapp_context_reload: seapp_contexts file is loaded from /seapp_contexts
10-10 14:38:55.843    1269-1269/org.android.airplane D/dalvikvm﹕ Late-enabling CheckJNI
10-10 14:38:55.943    1269-1269/org.android.airplane W/ApplicationPackageManager﹕ getCSCPackageItemText()
10-10 14:38:55.983    1269-1269/org.android.airplane E/MoreInfoHPW_ViewGroup﹕ Parent view is not a TextView
10-10 14:38:56.083    1269-1269/org.android.airplane I/Adreno-EGL﹕ <qeglDrvAPI_eglInitialize:410>: EGL 1.4 QUALCOMM build:  ()
    OpenGL ES Shader Compiler Version: E031.24.00.07
    Build Date: 01/22/14 Wed
    Local Branch: base_au149_adreno_au169_patches
    Remote Branch:
    Local Patches:
    Reconstruct Branch:
10-10 14:38:56.113    1269-1269/org.android.airplane D/OpenGLRenderer﹕ Enabling debug mode 0
10-10 14:38:58.823    1269-1269/org.android.airplane W/ApplicationPackageManager﹕ getCSCPackageItemText()

以下是一些代码,可让您查看我的视图层次结构。此代码在普通Activity的onCreate()方法中运行。

requestWindowFeature(Window.FEATURE_NO_TITLE);
getWindow().setFlags(
        WindowManager.LayoutParams.FLAG_FULLSCREEN,
        WindowManager.LayoutParams.FLAG_FULLSCREEN);
// this is my view of buttons, made from a table of png images
APButtonManager mButtons = new APButtonManager(this);
// this is my view of OpenGL stuff
APGLSurfaceView myAPView = new APGLSurfaceView(this);
// this is how I superimpose them
RelativeLayout mRelative = new RelativeLayout(this);
mRelative.addView(myAPView);
mRelative.addView(mButtons);
myAPView.setPreserveEGLContextOnPause(true);
// I tried the line below to see if the OpenGL would appear
//this.setContentView(myAPView);
// I settle on this line since the one above doesn't do anything
setContentView(mRelative);

我不知道该怎么办。我想要一个更有意义的错误,但这就是我所拥有的。任何帮助将不胜感激。

0 个答案:

没有答案