Flutterlocation: Android Compilation issue: Unresolved reference: createNotificationChannel

Created on 30 Dec 2020  路  3Comments  路  Source: Lyokone/flutterlocation

Describe the bug
Compilation issue:
location-3.2.1/android/src/main/java/com/lyokone/location/FlutterLocationService.kt: (122, 37): Unresolved reference: createNotificationChannel

Expected behavior
Compilation OK

Tested on:
Android
Migration done with https://github.com/flutter/flutter/wiki/Upgrading-pre-1.12-Android-projects

Other plugins:

  • List of others Flutter plugins that could interfere

Additional logs

some logs

Most helpful comment

I had a resolutionStrategy in my project build.gradle file. createNotificationChannel method is added in 1.1.0 onwards So Make sure you upgrade the version in resolutionStrategy.

```
configurations.all {
resolutionStrategy {
"androidx.core:core:1.0.2" //Update to "androidx.core:core:1.1.0"
}
}

All 3 comments

Facing a similar issue 馃槩

```
[ +462 ms] > Task :location:compileDebugKotlin FAILED
[ +1 ms] e: D:\toolsandroid\flutter-sdk.pub-cache\hosted\pub.dartlang.org\location-3.2.1androidsrc\main\java\com\lyokone\location\FlutterLocationService.kt: (122, 37): Unresolved
reference: createNotificationChannel
[ +6 ms] FAILURE: Build failed with an exception.
[ ] * What went wrong:
[ ] Execution failed for task ':location:compileDebugKotlin'.
[ ] > Compilation error. See log for more details
[ ] * Try:
[ ] Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
[ ] * Get more help at https://help.gradle.org
[ ] BUILD FAILED in 9s

I had a resolutionStrategy in my project build.gradle file. createNotificationChannel method is added in 1.1.0 onwards So Make sure you upgrade the version in resolutionStrategy.

```
configurations.all {
resolutionStrategy {
"androidx.core:core:1.0.2" //Update to "androidx.core:core:1.1.0"
}
}

I had a resolutionStrategy in my project build.gradle file. createNotificationChannel method is added in 1.1.0 onwards So Make sure you upgrade the version in resolutionStrategy.

configurations.all {
       resolutionStrategy {
                "androidx.core:core:1.0.2"  //Update to "androidx.core:core:1.1.0"
       }
   }

YOU ARE THE BEST!!!
It help me!!!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

giudon010 picture giudon010  路  3Comments

Dorbmon picture Dorbmon  路  8Comments

lehno picture lehno  路  5Comments

fasteater picture fasteater  路  11Comments

zeienko-vitalii picture zeienko-vitalii  路  7Comments