title: Android Java GetMethod NoSuchMethodException
body: <p>I'm getting this problem during designtime and can't for the life of me work out why.</p>
  
  <p>As a test, I've put in a literal value "blah", however this will be a variable later:</p>
  
  <pre><code>public void InitNewFragment(int FragmentNumber) {
      //Initialisation code for specific fragment
  
      Method[] listofmethods = FragManager.class.getMethods();
  
  
      Method m = FragManager.class.getDeclaredMethod("blah");
      Method mm = FragManager.class.getMethod("blahblah", Integer.class);
  
      //m.invoke(null);
      //mm.invoke(null, 7);
  }
  
  public void blah() {
  
  }
  public void blahblah(int x) {
  
  }  
  </code></pre>
  
  <p>I'm using this code to get a method based on a selected value from another list, but here using the literal value of blah() and blahblah().</p>
  
  <p>getMethods() works fine during debugging.</p>
  
  <p><strong>getMethod</strong> and <strong>getDeclaredMethod</strong> are causing errors <strong>during Design Time</strong> </p>
  
  <p>Any ideas?</p>
  
  <p>Many thanks,
  J</p>