我正在制作一个手机短片,jquerymobile HTML5应用。
我收到以下错误:“调用没有当前上下文的OpenGL ES API(每个线程记录一次)” 我找到了类似问题的解决方案,但对我没什么用。
我不明白为什么会出现这个错误,但是当我在html上调用新页面时发现这个错误。 我的html代码与本例中的代码类似: http://www.w3schools.com/jquerymobile/tryit.asp?filename=tryjqmob_pages
我正在使用eclipse和Android SDK Emulator。
我的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 :(得分:0)
你可以这样写:
<application android:hardwareAccelerated="true" ...>