Android,why reload all texture

Android,why reload all texture
0

#1

Hi,
I have finished my first android game, and i have published it on google play, but this morning, i noticed strange behavior, when i touch the home button, and i touch the app icon on the screen, the app takes small time to launch, and i see on the log screen reload all texture

Sometime there’s this message on the log screen:

OpenGL error 0x0505 in /XXXXXXX/proj.android/../cocos2d/cocos/ui/UILayout.cpp onBeforeVisitStencil 849

This problem does not present when i switch between app(launch the app from the cach not the icon on the screen),also does not present in the local test(with adb install …).
I have used coco2d-x v3.0

Please help me to deal with this problem.
Thanks


#2

It’s because of Android OS.

Note this http://developer.android.com/reference/android/opengl/GLSurfaceView.Renderer.html


#3

Thanks @hzlov, is there solution for this problem?


#4

I’m not sure but I’m guessing it’s because of app launches twice.

<activity android:name="org.cocos2dx.cpp.AppActivity"
          android:label="@string/app_name"
          android:screenOrientation="landscape"
          android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
          android:configChanges="orientation"
          android:launchMode="singleTask"> <!-- this one -->

Add it android:launchMode="singleTask" in manifest.xml
and try again.


#5

But this problem does not present in the local test(with adb install …)


#6

Dude, I have no idea why but your answer from nearly two years ago solved the issue I was struggling with for a few days. For me cocos2d was randomly restarting when I added new elements, and now it just works! It’s facking awesome! Thanks a lot :wink:


#7

Thanks man It solved my issue


#8

It is solved texture glitch issue