2014-04-23 30 views
4

我試圖在Android中使用PhoneGap開發應用程序。ResizeOffscreenFrameBuffer未能爲屏外分配存儲空間

這是我的代碼

package com.example.streat; 

import org.apache.cordova.DroidGap; 

import android.os.Bundle; 
import android.util.Log; 

public class MainActivity extends DroidGap { 

    @Override 
     public void onCreate(Bundle savedInstanceState) { 
      super.onCreate(savedInstanceState); 
      Log.e("SOMESTRING", "I am into pGAP"); 
      super.setIntegerProperty("loadUrlTimeoutValue", 60000); 
      super.loadUrl("file:///android_asset/www/index.html"); 
     } 
} 

AndroidManifest.xml中

<?xml version="1.0" encoding="utf-8"?> 
<manifest xmlns:android="http://schemas.android.com/apk/res/android" 
    package="com.example.streat" 
    android:versionCode="1" 
    android:versionName="1.0" > 

    <uses-sdk 
     android:minSdkVersion="8" 
     android:targetSdkVersion="19" /> 

    <uses-permission android:name="android.permission.INTERNET" /> 
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/> 


    <application 
     android:allowBackup="true" 
     android:icon="@drawable/ic_launcher" 
     android:label="@string/app_name" 
     android:theme="@style/AppTheme" > 
     <activity 
      android:name="com.example.streat.MainActivity" 
      android:label="@string/app_name" > 
      <intent-filter> 
       <action android:name="android.intent.action.MAIN" /> 

       <category android:name="android.intent.category.LAUNCHER" /> 
      </intent-filter> 
     </activity> 
    </application> 



<activity 
    android:name="org.apache.cordova.DroidGap" 
    android:label="@string/app_name" 
    android:configChanges="orientation|keyboardHidden"> 
    <intent-filter></intent-filter> 
</activity> 


</manifest> 

的logcat的內部監控的時候,我在年底得到此異常

04-23 05:27:36.570: E/chromium(902): [ERROR:gles2_cmd_decoder.cc(3389)] GLES2DecoderImpl::ResizeOffscreenFrameBuffer failed to allocate storage for offscreen target depth buffer. 

04-23 05:27:36.580: E/chromium(902): [ERROR:in_process_command_buffer.cc(465)] Could not initialize decoder. 

04-23 05:27:36.590: A/libc(902): Fatal signal 11 (SIGSEGV) at 0x00000048 (code=1), thread 902 (.example.streat) 

有誰請告訴我如何解決這個錯誤。 我也試圖增加內存和堆的大小,但沒有任何工作。

回答

1

聽起來像GL/ES支持中的問題。在AVD中禁用「Use Host GPU」仿真選項可能會有所幫助。

相關問題