title: Qt does not compile callStaticObjectMethod()
body: <p>I wrote the following code from <a href="https://stackoverflow.com/questions/28693031/calling-simple-java-static-method-via-jni-does-not-work-though-c-compiles-and">this question</a> and it was compiled and worked perfectly:</p>
  
  <pre><code>QAndroidJniObject str =  QAndroidJniObject::callStaticObjectMethod&lt;jstring&gt;(
                                 "org/.../TestClass"
                                 ,"staticMethod");
  </code></pre>
  
  <p>Now I have changed the java method and it needs an input parameter of type string. </p>
  
  <p><strong>The Java code</strong>:</p>
  
  <pre><code>public class TestClass{
      public string str;
      public TestClass() {
          str = "Test From Java";
      }
      public static String staticMethod(String str) {
          return "Test From Java, "+str;
      }
  }
  </code></pre>
  
  <p>But adding the method signature and input parameter does not work for me. I wrote this code to invoke the static method within the mentioned java class using JNI:</p>
  
  <pre><code>QAndroidJniObject val = QAndroidJniObject::fromString("Test String");
  QAndroidJniObject str = QAndroidJniObject::callStaticObjectMethod&lt;jstring&gt;(
            "org/.../TestClass"
            ,"staticMethod"
            ,"(Ljava/lang/String;)Ljava/lang/String;"
            ,val.object&lt;jstring&gt;());
  </code></pre>
  
  <p>But Qt creator does not build it, printing this error:</p>
  
  <blockquote>
  <pre><code>...testclass.cpp:21: error:
  no matching function for call to 'QAndroidJniObject::callStaticObjectMethod(
  const char [36], const char [13], const char [39], _jstring*)'
                                                          ,val.object&lt;jstring&gt;());
                                                                                ^
  </code></pre>
  </blockquote>
  
  <p>Thanks for any help.</p>
  
  <h2>I also tried callStaticMethod</h2>
  
  <p>For this:</p>
  
  <pre><code>jstring str = QAndroidJniObject::callStaticMethod&lt;jstring&gt;(
                        "org/.../TestClass"
                        ,"staticMethod"
                        ,"(Ljava/lang/String;)Ljava/lang/String;"
                        ,val.object&lt;jstring&gt;());
  </code></pre>
  
  <p>I got the following error :</p>
  
  <blockquote>
    <p>...\testclass.cpp:21: error: undefined reference to '_jstring* QAndroidJniObject::callStaticMethod&lt;_jstring*>(char const*, char
    const*, char const*, ...)'</p>
  </blockquote>
  
  <p>## I also tried callStaticObjectMethod without template parameter ##</p>
  
  <blockquote>
    <p>QAndroidJniObject str = QAndroidJniObject::callStaticObjectMethod("org/...TextClass" ,"staticMethod" ,"(Ljava/lang/String;)Ljava/lang/String;",val.object());</p>
  </blockquote>
  
  <p><em>It always returns an empty string. I'm not sure if it is really emty or not. I use <code>qCritical() &lt;&lt; str.toString();</code> to print the string but an empty qout is printed then!</em></p>