title: I am getting deprecated error when building my apps
body: <p>I am trying to build my app but all the time it shows me these errors i dont know what to do.. Please read bellow :</p>
  <pre><code>E:\flutter\.pub-cache\hosted\pub.dartlang.org\share-0.6.5+1\android\src\main\java\io\flutter\plugins\share\SharePlugin.java:14: warning: [deprecation] PluginRegistry in io.flutter.plugin.common has been deprecated
  import io.flutter.plugin.common.PluginRegistry.Registrar;
                                 ^
  E:\flutter\.pub-cache\hosted\pub.dartlang.org\share-0.6.5+1\android\src\main\java\io\flutter\plugins\share\SharePlugin.java:14: warning: [deprecation] PluginRegistry in io.flutter.plugin.common has been deprecated
  import io.flutter.plugin.common.PluginRegistry.Registrar;
                                 ^
  error: warnings found and -Werror specified
  1 error
  2 warnings
  
  FAILURE: Build failed with an exception.
  
  * What went wrong:
  Execution failed for task ':share:compileDebugJavaWithJavac'.
  &gt; Compilation failed; see the compiler error output for details.
  
  * Try:
  Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
  
  * Get more help at https://help.gradle.org
  
  BUILD FAILED in 2m 36s
  Exception: Gradle task assembleDebug failed with exit code 1
  </code></pre>