I try to implement CordovaWebView in an activity but I get the following Error:
android.view.InflateException: Binary XML file line #12: Error inflating class
org.apache.cordova.CordovaWebView
Here is my Code:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<!-- TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/hello" /-->
<org.apache.cordova.CordovaWebView
android:id="@+id/tutorialView"
android:layout_width="fill_parent"
android:layout_height="fill_parent" />
</LinearLayout>
and:
public class NewActivity extends Activity implements CordovaInterface {
CordovaWebView cwv;
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
cwv = (CordovaWebView) findViewById(R.id.tutorialView);
cwv.loadUrl("file:///android_asset/www/index.html");
}
}
My Phonegap version is 2.2.0 can anyone tell why it is happening?
thanks in advance
kobi