3

I am working on a phonegap, jquerymobile HTML5 app.

I am getting the following error: "Call to OpenGL ES API with no current context (logged once per thread)" I found solutions on similar problems but nothing worked for me.

I don't understand why this error occure, but as I observed this error occur when I call a new page on html. My html code it is similar with the code in this example: http://www.w3schools.com/jquerymobile/tryit.asp?filename=tryjqmob_pages

I am using eclipse along with Android SDK Emulator.

My Activity class is mentioned in start guides of Phonegap Android. This is my Activity class:

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);
}
}
genpfault
  • 51,148
  • 11
  • 85
  • 139
Maria Kypr
  • 41
  • 2
  • 8
  • does it affect anything ? I dont know about solution but i also keep on getting it at times but it never harmed ! – Abhishek Bansal Sep 29 '14 at 09:55
  • At this moment, it's not affecting anything. But I don't know if it will affect something later. – Maria Kypr Sep 29 '14 at 11:18
  • ok so thing is this error is not specific to `cordova`(i have no idea what it is).. A simple google search will tell you that many people are having same issue in android.. you might want to check those posts out. – Abhishek Bansal Sep 29 '14 at 14:37
  • 1
    @AbhishekBansal Whether it *appears* to be affecting something or not is irrelevant. Warnings/errors aren't thrown for no reason. Just because you don't think it's harming something, doesn't mean it isn't or won't. – arkon Oct 05 '14 at 19:45
  • @b1nary.atr0phy ya i understand it completely.. i was just trying to say that its a common issue ! – Abhishek Bansal Oct 06 '14 at 02:45
  • See will this help: http://stackoverflow.com/questions/20159821/opengl-es-not-working-no-current-context – lfree Jan 07 '15 at 07:54

1 Answers1

0

You can write so:

<application android:hardwareAccelerated="true" ...>
Zero
  • 2,764
  • 1
  • 17
  • 20