title: Google Cloud Endpoints Migration v1 to v2
body: <p>As per a google mail I received I am trying to migrate my endpoints code from v1 to v2 as per the directions given on this link. </p>
  
  <p><a href="https://cloud.google.com/endpoints/docs/frameworks/legacy/v1/java/migrating" rel="nofollow noreferrer">https://cloud.google.com/endpoints/docs/frameworks/legacy/v1/java/migrating</a></p>
  
  <p>When I try executing gradle endpointsDiscoveryDocs I am getting the following error</p>
  
  <p>Execution failed for task ':endpointsDiscoveryDocs'.</p>
  
  <blockquote>
    <p>com.google.common.reflect.TypeToken.isSubtypeOf(Ljava/lang/reflect/Type;)Z</p>
  </blockquote>
  
  <p>I tried with stacktrace option but didn't get any clue as to how I can fix this. </p>
  
  <p>Any help is appreciated. </p>
  
  <p>Regards.</p>