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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

A problem occurred configuring project ':permission_handler'. #35

Closed
1 of 2 tasks
timtraversy opened this issue Oct 18, 2018 · 3 comments
Closed
1 of 2 tasks

A problem occurred configuring project ':permission_handler'. #35

timtraversy opened this issue Oct 18, 2018 · 3 comments

Comments

@timtraversy
Copy link

馃悰 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.
screen shot 2018-10-18 at 2 29 27 pm

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:

subprojects {
    project.configurations.all {
        resolutionStrategy.eachDependency { details ->
            if (details.requested.group == 'com.android.support'
                    && !details.requested.name.contains('multidex') ) {
                details.useVersion "26.1.0"
            }
        }
    }
}

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:

  • 馃摫 iOS
  • 馃 Android
@timtraversy
Copy link
Author

I just created a new flutter project and included the same dependency, and the issue happened again, so it's not just an issue in my current project.

@mvanbeusekom
Copy link
Member

mvanbeusekom commented Oct 19, 2018

@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).

@timtraversy
Copy link
Author

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!

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

2 participants