When install connectivity package , can not build apk in the connectivity version 2.0.1 .
Asked
Active
Viewed 325 times
0
-
What is your gradle version? – Akif Nov 06 '20 at 20:57
-
classpath 'com.android.tools.build:gradle:3.6.1' – DevName Nov 06 '20 at 21:55
-
What about your Java sdk/jdk? If it is not up to date, you can upgrade it from here: https://www.oracle.com/java/technologies/javase-downloads.html – Akif Nov 07 '20 at 06:32
-
And you can try to run this simple example to understand the reason for the problem: https://github.com/flutter/plugins/tree/master/packages/connectivity/connectivity/example – Akif Nov 07 '20 at 06:36
-
java jdk version is 14.0.1 – DevName Nov 07 '20 at 11:40
1 Answers
0
Go to
android->gradle->wrapper->gradle-wrapper.properties
file and open it. change this line of code
"distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip"
to
distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-all.zip
and then; type this command below terminal and enter
flutter clean
when its finished; run
flutter run
after these steps, if you still get errors; follow these instructions at this answer.

Taady
- 2,409
- 2
- 10
- 24