将gradle更新到最新版本5.4.1后,出现以下错误
Launching lib\main.dart on A37f in debug mode...
Initializing gradle...
Resolving dependencies...
Running Gradle task 'assembleDebug'...
C:\src\flutter\flutter\.pub-cache\hosted\pub.dartlang.org\location_permissions-2.0.3\android\src\main\java\com\baseflow\location_permissions\LocationPermissionsPlugin.java:284: error: cannot find symbol
|| (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q && permission.equals(Manifest.permission.ACCESS_BACKGROUND_LOCATION));
^
symbol: variable Q
location: class VERSION_CODES
C:\src\flutter\flutter\.pub-cache\hosted\pub.dartlang.org\location_permissions-2.0.3\android\src\main\java\com\baseflow\location_permissions\LocationPermissionsPlugin.java:284: error: cannot find symbol
|| (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q && permission.equals(Manifest.permission.ACCESS_BACKGROUND_LOCATION));
^
symbol: variable ACCESS_BACKGROUND_LOCATION
location: class permission
C:\src\flutter\flutter\.pub-cache\hosted\pub.dartlang.org\location_permissions-2.0.3\android\src\main\java\com\baseflow\location_permissions\LocationPermissionsPlugin.java:310: error: cannot find symbol
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q && hasPermissionInManifest(Manifest.permission.ACCESS_BACKGROUND_LOCATION, context)) {
^
symbol: variable Q
location: class VERSION_CODES
C:\src\flutter\flutter\.pub-cache\hosted\pub.dartlang.org\location_permissions-2.0.3\android\src\main\java\com\baseflow\location_permissions\LocationPermissionsPlugin.java:310: error: cannot find symbol
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q && hasPermissionInManifest(Manifest.permission.ACCESS_BACKGROUND_LOCATION, context)) {
^
symbol: variable ACCESS_BACKGROUND_LOCATION
location: class permission
C:\src\flutter\flutter\.pub-cache\hosted\pub.dartlang.org\location_permissions-2.0.3\android\src\main\java\com\baseflow\location_permissions\LocationPermissionsPlugin.java:311: error: cannot find symbol
permissionNames.add(Manifest.permission.ACCESS_BACKGROUND_LOCATION);
^
symbol: variable ACCESS_BACKGROUND_LOCATION
location: class permission
5 errors
Finished with error: Gradle task assembleDebug failed with exit code 1
如何解决此错误?