title: Issue using protobuf.util.JsonFormat in Android Studio
body: <p>I successfully configured my project in Android Studio to generate the Java class for a protobuf and use it in my Java code. However, when trying the Json printer (in protobuf.util.JsonFormat) I get this:</p>
  
  <p><em>error: incompatible types: Person cannot be converted to MessageOrBuilder</em></p>
  
  <p>My code looks like: </p>
  
  <pre><code>Person      msg = Person.newBuilder().setName("A name").build();
  Printer pp = JsonFormat.printer().preservingProtoFieldNames();
  String val = pp.print(msg);
  </code></pre>
  
  <p>where Person is defined in the proto file. And the error is on the last line.</p>
  
  <p>I tried to cast msg, but without success. I also try to not use lite but regular protobuf but I was not successful at compiling with it (and I am not sure if this would make a difference so I did not pursue).</p>