title: How to solve permission handler error in flutter?
body: <p>Not sure where I made mistake but I got error while implementing permission_handler: ^7.1.0 ,the error message is  ``` C:\src\flutter.pub-cache\hosted\http://pub.dartlang.org\permission_handler-7.2.0\android\src\main\java\com\baseflow\permissionhandler\ServiceManager.java:152: warning: [deprecation] getDefaultAdapter() in BluetoothAdapter has been deprecated
  final BluetoothAdapter bluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
  ^
  error: warnings found and -Werror specified
  1 error
  1 warning</p>
  <p>FAILURE: Build failed with an exception.</p>
  <ul>
  <li>What went wrong:
  Execution failed for task ':permission_handler:compileDebugJavaWithJavac'.</li>
  </ul>
  <blockquote>
  <p>Compilation failed; see the compiler error output for details.</p>
  </blockquote>
  <ul>
  <li><p>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.</p>
  </li>
  <li><p>Get more help at <a href="https://help.gradle.org" rel="nofollow noreferrer">https://help.gradle.org</a></p>
  </li>
  </ul>
  <p>BUILD FAILED in 1m 10s
  Exception: Gradle task assembleDebug failed with exit code 1 ```
  Below I attached necessary screenshots <a href="https://i.stack.imgur.com/FYupM.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/FYupM.jpg" alt="flutter doctor -v" /></a>
  And I also given permission in Androidmanifest</p>
  <pre><code>&lt;uses-permission android:name=&quot;android.permission.INTERNET&quot;/&gt;
  &lt;uses-permission android:name=&quot;android.permission.ACCESS_COARSE_LOCATION&quot;/&gt;
  &lt;uses-permission android:name=&quot;android.permission.ACCESS_FINE_LOCATION&quot;/&gt;
  </code></pre>
  <p>And compileSdkVersion 31, minSdkVersion 21, targetSdkVersion 30. Hope I have given all necessary details. If anything need please comment and please help to solve this issue and I don’t want to change my sdk version. Thank you in Advance.</p>