Android ICS : JNI error attempt to use stale local reference 0x1

前端 未结 6 682
终归单人心
终归单人心 2021-02-02 11:50

After upgrading my phone to android 4.03 ics my game dosent open anymore ,it just closes without any error messege on deviCe and with this on eclipse

04-02 16:         


        
6条回答
  •  自闭症患者
    2021-02-02 12:48

    The "stale local reference" error means that you're saving a local reference to some Java object between JNI calls; you need to convert that reference to a global reference using the NewGlobalRef method before doing anything that would cause the reference to persist outside the scope of the one JNI call.

    Although strictly this was always necessary -- it's in the JNI spec -- it's only since Ice Cream Sandwich that this actually causes problems on the Android platform.

提交回复
热议问题