2014-09-29 87 views
3

我正在使用phonegap,jquerymobile HTML5應用程序。調用OpenGL ES API沒有當前上下文(每個線程記錄一次)Cordova

我收到以下錯誤:「調用OpenGL ES API沒有當前上下文(每個線程記錄一次)」 我發現類似問題的解決方案,但沒有爲我工作。

我不明白爲什麼會出現這個錯誤,但是當我在html上調用一個新頁面時發現這個錯誤。 我的html代碼與本例中的代碼類似: http://www.w3schools.com/jquerymobile/tryit.asp?filename=tryjqmob_pages

我使用eclipse和Android SDK模擬器一起使用。

我的Activity類在Phonegap Android的開始指南中提到。這是我的Activity類:

import android.os.Bundle; 
import android.view.Menu; 
import android.view.MenuItem; 
import org.apache.cordova.*; 

public class MainActivity extends DroidGap { 

@Override 
public void onCreate(Bundle savedInstanceState) { 
    super.onCreate(savedInstanceState); 
    super.setIntegerProperty("loadUrlTimeoutValue", 60000); 
    super.loadUrl("file:///android_asset/www/index.html"); 
} 


@Override 
public boolean onCreateOptionsMenu(Menu menu) { 
    // Inflate the menu; this adds items to the action bar if it is present. 
    getMenuInflater().inflate(R.menu.main, menu); 
    return true; 
} 

@Override 
public boolean onOptionsItemSelected(MenuItem item) { 
    // Handle action bar item clicks here. The action bar will 
    // automatically handle clicks on the Home/Up button, so long 
    // as you specify a parent activity in AndroidManifest.xml. 
    int id = item.getItemId(); 
    if (id == R.id.action_settings) { 
     return true; 
    } 
    return super.onOptionsItemSelected(item); 
} 
} 
+0

不會影響什麼?我不知道解決方案,但我也不斷了解它,但它從未受到傷害! – 2014-09-29 09:55:31

+0

在這一刻,它不會影響任何東西。但我不知道它是否會影響後來的事情。 – 2014-09-29 11:18:12

+0

好的,所以事情是這個錯誤不是特定於'cordova'(我不知道它是什麼)..一個簡單的谷歌搜索會告訴你,許多人在Android中有相同的問題..你可能想檢查這些帖子出。 – 2014-09-29 14:37:11

回答

0

你可以這樣寫:

<application android:hardwareAccelerated="true" ...> 
相關問題