title: Android App with PhoneGap: InvocationTarget Exception by calling addJavascriptInterface
body: <p>I am using the Android SDK and PhoneGap to create a native Android App. Now I want to use Java methods in the view, calling by JS methods.</p>
  
  <p>In the Main Class I called the "addJavascriptInterface" method to bind a java class with the view.</p>
  
  <pre><code>public class App extends DroidGap {
      @Override
      public void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
  
          appView.addJavascriptInterface(new JavaScriptInterface(this), "Android");        
  
          super.loadUrl("file:///android_asset/www/index.html");
      }
  }
  </code></pre>
  
  <p>The problem is I get an InvocationTarget Exception when the programm executes the line "appView.addJavascript..." and the program crashes on the device.</p>
  
  <p>Any solutions here?</p>
  
  <p>Thanks!</p>