Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gradle issue Minimum supported Gradle version is 5.4.1. Current version is 4.10.2. #18

Open
azizkazdal opened this issue Dec 18, 2020 · 0 comments

Comments

@azizkazdal
Copy link

azizkazdal commented Dec 18, 2020

hi,
when I want to build my flutter application APK I am getting below issue.

*** What went wrong:
A problem occurred evaluating root project 'flutter_bluetooth_basic'.
> Failed to apply plugin [id 'com.android.library']
   > Minimum supported Gradle version is 5.4.1. Current version is 4.10.2. If using the gradle wrapper, try editing the distributionUrl in C:\flutter\.pub-cache\hosted\pub.dartlang.org\flutter_bluetooth_basic-0.1.5\android\gradle\wrapper\gradle-wrapper.properties to gradle-5.4.1-all.zip**

When I changed to gradle version to 5.4.1 issue is changing to below

**C:\flutter\.pub-cache\hosted\pub.dartlang.org\flutter_bluetooth_basic-0.1.5\android\src\main\java\com\tablemi\flutter_bluetooth_basic\FlutterBluetoothBasicPlugin.java:18: error: package androidx.core.app does not exist
import androidx.core.app.ActivityCompat;
                        ^
C:\flutter\.pub-cache\hosted\pub.dartlang.org\flutter_bluetooth_basic-0.1.5\android\src\main\java\com\tablemi\flutter_bluetooth_basic\FlutterBluetoothBasicPlugin.java:19: error: package androidx.core.content does not exist
import androidx.core.content.ContextCompat;
                            ^
C:\flutter\.pub-cache\hosted\pub.dartlang.org\flutter_bluetooth_basic-0.1.5\android\src\main\java\com\tablemi\flutter_bluetooth_basic\FlutterBluetoothBasicPlugin.java:92: error: cannot find symbol
        if (ContextCompat.checkSelfPermission(activity, Manifest.permission.ACCESS_COARSE_LOCATION)
            ^
  symbol:   variable ContextCompat
  location: class FlutterBluetoothBasicPlugin
C:\flutter\.pub-cache\hosted\pub.dartlang.org\flutter_bluetooth_basic-0.1.5\android\src\main\java\com\tablemi\flutter_bluetooth_basic\FlutterBluetoothBasicPlugin.java:94: error: cannot find symbol
          ActivityCompat.requestPermissions(
          ^
  symbol:   variable ActivityCompat
  location: class FlutterBluetoothBasicPlugin
4 errors**

and gradle wrapper properties

**```
#Fri Jun 23 08:50:38 CEST 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https://services.gradle.org/distributions/gradle-5.6.2-all.zip

@azizkazdal azizkazdal changed the title gradle issue gradle issue Minimum supported Gradle version is 5.4.1. Current version is 4.10.2. Dec 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant