You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using the permission_handler library in my Flutter project. It builds fine on iOS, but throws an error when I try to build on Android. It configures all my other plugins correctly, but it fails on this one for some reason.
Maybe this is conflicting with a Kotlin or Gradle version? My Kotlin version is 1.2.51, Gradle is 3.2.1, targetSdkVersion is 27.
As recommended by this flutter issue comment, I also have this included in my project level build.gradle file:
@timtraversy, the permission_handler is currently using Kotlin version 1.2.71 so this might conflict with your Kotlin version (although I am not sure). Could you try updating you Kotlin to this version (or higher)?
If this doesn't solve the problem, could you then post the contents of your build.gradle and gradle-wrapper.properties files?
This issues seems to also happen when you upgrade Android studio to use the latest Kotlin and Gradle version. However the Flutter templates have not been fully updated yet to match these version numbers (see flutter/flutter#22614).
A pull-request to update the Flutter project templates is already submitted, so you could try and manually copy the changes into your project so they reflect the changes in the pull-request (the PR can be found here).
Upgrading my Kotlin version to 1.2.71 fixed the error with your library, although it's now breaking an unrelated part of the flutter build process. But all is well here I believe!
馃悰 Bug Report
I'm using the permission_handler library in my Flutter project. It builds fine on iOS, but throws an error when I try to build on Android. It configures all my other plugins correctly, but it fails on this one for some reason.
Maybe this is conflicting with a Kotlin or Gradle version? My Kotlin version is
1.2.51
, Gradle is3.2.1
, targetSdkVersion is27
.As recommended by this flutter issue comment, I also have this included in my project level
build.gradle
file:Expected behavior
Plugin builds successfully.
Reproduction steps
Build Flutter project on Android with most recent permission_handler library as dependency.
Configuration
Version: 2.1.0
Platform:
The text was updated successfully, but these errors were encountered: