title: How to Embed Youtube Videos using Object tag in Android?
body: <p>I am trying to embed a youtube video on a xml file for my application.</p>
  
  <p>Following is my XML file:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;WebView
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/tour_webview"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"&gt;  
    &lt;object 
      width="480" 
      height="330"&gt;
      &lt;param 
          name="movie" 
          value="http://www.youtube.com/v/tjxpMhGwXH4?version=3&amp;amp;hl=pt_BR&amp;amp;rel=0"&gt;   
      &lt;/param&gt;
      &lt;param 
      name="allowFullScreen" 
      value="true"&gt;
  &lt;/param&gt;
  &lt;param 
      name="allowscriptaccess" 
      value="always"&gt;
  &lt;/param&gt;
  &lt;embed 
      src="http://www.youtube.com/v/tjxpMhGwXH4?version=3&amp;amp;hl=pt_BR&amp;amp;rel=0" 
      type="application/x-shockwave-flash" 
      width="480" 
      height="330" 
      allowscriptaccess="always" 
      allowfullscreen="true" /&gt;
  &lt;/object&gt;  
  &lt;/WebView&gt;
  </code></pre>
  
  <p>Following is my java file:</p>
  
  <pre><code>    public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.tours_04);
      WebView wv = (WebView)findViewById(R.id.tour_webview);
      wv.getSettings().setPluginsEnabled(true);
      wv.getSettings().setJavaScriptEnabled(true);
      wv.getSettings().setAllowFileAccess(true);
      wv.loadUrl("http://www.youtube.com/watch?v=tjxpMhGwXH4");
      setContentView(wv);
  }
  </code></pre>
  
  <p>Logcat says:</p>
  
  <p><strong>Caused by abdroid.View.InflateException: Binary XML file line #7:Error inflating class object</strong></p>
  
  <p>Help Needed!</p>