mattermoran / map_launcher

Flutter plugin for launching maps
MIT License
259 stars 116 forks source link

Unable to use plugin on android with flutter 2.10.x #109

Closed tobias-ullerich-init closed 2 years ago

tobias-ullerich-init commented 2 years ago

Hi,

I'm using your plugin in my with the latest Flutter version (2.10.2) and want to upgrade from the plugin version 2.1.1 to the latest version. Unfortunately I got some kotlin compiler issues on the android side since there are some errors in the visibility of types. The complete log output from gradle is at the end.

In my opinion there is some incompatibility between the kotlin versions. My app is using kotlin version "1.5.31" where as your plugin is using "1.3.50".

Thanks for your help in advance

Launching lib/main.dart on Android SDK built for x86 in debug mode...
Running Gradle task 'assembleStagingDebug'...
e: ../hosted/pub.dartlang.org/map_launcher-2.1.1/android/src/main/kotlin/com/alexmiller/map_launcher/MapLauncherPlugin.kt: (14, 20): Redeclaration: MapType
e: ../hosted/pub.dartlang.org/map_launcher-2.1.1/android/src/main/kotlin/com/alexmiller/map_launcher/MapLauncherPlugin.kt: (16, 15): Redeclaration: MapModel
e: ../hosted/pub.dartlang.org/map_launcher-2.1.1/android/src/main/kotlin/com/alexmiller/map_launcher/MapLauncherPlugin.kt: (22, 7): Redeclaration: MapLauncherPlugin
e: ../hosted/pub.dartlang.org/map_launcher-2.2.1+1/android/src/main/kotlin/com/alexmiller/map_launcher/MapLauncherPlugin.kt: (14, 20): Redeclaration: MapType
e: ../hosted/pub.dartlang.org/map_launcher-2.2.1+1/android/src/main/kotlin/com/alexmiller/map_launcher/MapLauncherPlugin.kt: (16, 15): Redeclaration: MapModel
e: ../hosted/pub.dartlang.org/map_launcher-2.2.1+1/android/src/main/kotlin/com/alexmiller/map_launcher/MapLauncherPlugin.kt: (16, 37): Cannot access 'MapType': it is private in file
e: ../hosted/pub.dartlang.org/map_launcher-2.2.1+1/android/src/main/kotlin/com/alexmiller/map_launcher/MapLauncherPlugin.kt: (18, 43): Cannot access 'MapType': it is private in file
e: ../hosted/pub.dartlang.org/map_launcher-2.2.1+1/android/src/main/kotlin/com/alexmiller/map_launcher/MapLauncherPlugin.kt: (22, 7): Redeclaration: MapLauncherPlugin
e: ../hosted/pub.dartlang.org/map_launcher-2.2.1+1/android/src/main/kotlin/com/alexmiller/map_launcher/MapLauncherPlugin.kt: (36, 31): Cannot access 'channel': it is private in 'MapLauncherPlugin'
e: ../hosted/pub.dartlang.org/map_launcher-2.2.1+1/android/src/main/kotlin/com/alexmiller/map_launcher/MapLauncherPlugin.kt: (37, 31): Cannot access 'context': it is private in 'MapLauncherPlugin'
e: ../hosted/pub.dartlang.org/map_launcher-2.2.1+1/android/src/main/kotlin/com/alexmiller/map_launcher/MapLauncherPlugin.kt: (38, 31): Cannot access 'channel': it is private in 'MapLauncherPlugin'
e: ../hosted/pub.dartlang.org/map_launcher-2.2.1+1/android/src/main/kotlin/com/alexmiller/map_launcher/MapLauncherPlugin.kt: (43, 13): Cannot access 'MapModel': it is private in file
e: ../hosted/pub.dartlang.org/map_launcher-2.2.1+1/android/src/main/kotlin/com/alexmiller/map_launcher/MapLauncherPlugin.kt: (43, 22): Cannot access 'MapType': it is private in file
e: ../hosted/pub.dartlang.org/map_launcher-2.2.1+1/android/src/main/kotlin/com/alexmiller/map_launcher/MapLauncherPlugin.kt: (43, 30): Cannot access 'MapType': it is private in file
e: ../hosted/pub.dartlang.org/map_launcher-2.2.1+1/android/src/main/kotlin/com/alexmiller/map_launcher/MapLauncherPlugin.kt: (44, 13): Cannot access 'MapModel': it is private in file
e: ../hosted/pub.dartlang.org/map_launcher-2.2.1+1/android/src/main/kotlin/com/alexmiller/map_launcher/MapLauncherPlugin.kt: (44, 22): Cannot access 'MapType': it is private in file
e: ../hosted/pub.dartlang.org/map_launcher-2.2.1+1/android/src/main/kotlin/com/alexmiller/map_launcher/MapLauncherPlugin.kt: (44, 30): Cannot access 'MapType': it is private in file
e: ../hosted/pub.dartlang.org/map_launcher-2.2.1+1/android/src/main/kotlin/com/alexmiller/map_launcher/MapLauncherPlugin.kt: (45, 13): Cannot access 'MapModel': it is private in file
e: ../hosted/pub.dartlang.org/map_launcher-2.2.1+1/android/src/main/kotlin/com/alexmiller/map_launcher/MapLauncherPlugin.kt: (45, 22): Cannot access 'MapType': it is private in file
e: ../hosted/pub.dartlang.org/map_launcher-2.2.1+1/android/src/main/kotlin/com/alexmiller/map_launcher/MapLauncherPlugin.kt: (45, 30): Cannot access 'MapType': it is private in file
e: ../hosted/pub.dartlang.org/map_launcher-2.2.1+1/android/src/main/kotlin/com/alexmiller/map_launcher/MapLauncherPlugin.kt: (46, 13): Cannot access 'MapModel': it is private in file
e: ../hosted/pub.dartlang.org/map_launcher-2.2.1+1/android/src/main/kotlin/com/alexmiller/map_launcher/MapLauncherPlugin.kt: (46, 22): Cannot access 'MapType': it is private in file
e: ../hosted/pub.dartlang.org/map_launcher-2.2.1+1/android/src/main/kotlin/com/alexmiller/map_launcher/MapLauncherPlugin.kt: (46, 30): Cannot access 'MapType': it is private in file
e: ../hosted/pub.dartlang.org/map_launcher-2.2.1+1/android/src/main/kotlin/com/alexmiller/map_launcher/MapLauncherPlugin.kt: (47, 13): Cannot access 'MapModel': it is private in file
e: ../hosted/pub.dartlang.org/map_launcher-2.2.1+1/android/src/main/kotlin/com/alexmiller/map_launcher/MapLauncherPlugin.kt: (47, 22): Cannot access 'MapType': it is private in file
e: ../hosted/pub.dartlang.org/map_launcher-2.2.1+1/android/src/main/kotlin/com/alexmiller/map_launcher/MapLauncherPlugin.kt: (47, 30): Cannot access 'MapType': it is private in file
e: ../hosted/pub.dartlang.org/map_launcher-2.2.1+1/android/src/main/kotlin/com/alexmiller/map_launcher/MapLauncherPlugin.kt: (48, 13): Cannot access 'MapModel': it is private in file
e: ../hosted/pub.dartlang.org/map_launcher-2.2.1+1/android/src/main/kotlin/com/alexmiller/map_launcher/MapLauncherPlugin.kt: (48, 22): Cannot access 'MapType': it is private in file
e: ../hosted/pub.dartlang.org/map_launcher-2.2.1+1/android/src/main/kotlin/com/alexmiller/map_launcher/MapLauncherPlugin.kt: (48, 30): Cannot access 'MapType': it is private in file
e: ../hosted/pub.dartlang.org/map_launcher-2.2.1+1/android/src/main/kotlin/com/alexmiller/map_launcher/MapLauncherPlugin.kt: (49, 13): Cannot access 'MapModel': it is private in file
e: ../hosted/pub.dartlang.org/map_launcher-2.2.1+1/android/src/main/kotlin/com/alexmiller/map_launcher/MapLauncherPlugin.kt: (49, 22): Cannot access 'MapType': it is private in file
e: ../hosted/pub.dartlang.org/map_launcher-2.2.1+1/android/src/main/kotlin/com/alexmiller/map_launcher/MapLauncherPlugin.kt: (49, 30): Cannot access 'MapType': it is private in file
e: ../hosted/pub.dartlang.org/map_launcher-2.2.1+1/android/src/main/kotlin/com/alexmiller/map_launcher/MapLauncherPlugin.kt: (50, 13): Cannot access 'MapModel': it is private in file
e: ../hosted/pub.dartlang.org/map_launcher-2.2.1+1/android/src/main/kotlin/com/alexmiller/map_launcher/MapLauncherPlugin.kt: (50, 22): Cannot access 'MapType': it is private in file
e: ../hosted/pub.dartlang.org/map_launcher-2.2.1+1/android/src/main/kotlin/com/alexmiller/map_launcher/MapLauncherPlugin.kt: (50, 30): Cannot access 'MapType': it is private in file
e: ../hosted/pub.dartlang.org/map_launcher-2.2.1+1/android/src/main/kotlin/com/alexmiller/map_launcher/MapLauncherPlugin.kt: (51, 13): Cannot access 'MapModel': it is private in file
e: ../hosted/pub.dartlang.org/map_launcher-2.2.1+1/android/src/main/kotlin/com/alexmiller/map_launcher/MapLauncherPlugin.kt: (51, 22): Cannot access 'MapType': it is private in file
e: ../hosted/pub.dartlang.org/map_launcher-2.2.1+1/android/src/main/kotlin/com/alexmiller/map_launcher/MapLauncherPlugin.kt: (51, 30): Cannot access 'MapType': it is private in file
e: ../hosted/pub.dartlang.org/map_launcher-2.2.1+1/android/src/main/kotlin/com/alexmiller/map_launcher/MapLauncherPlugin.kt: (52, 13): Cannot access 'MapModel': it is private in file
e: ../hosted/pub.dartlang.org/map_launcher-2.2.1+1/android/src/main/kotlin/com/alexmiller/map_launcher/MapLauncherPlugin.kt: (52, 22): Cannot access 'MapType': it is private in file
e: ../hosted/pub.dartlang.org/map_launcher-2.2.1+1/android/src/main/kotlin/com/alexmiller/map_launcher/MapLauncherPlugin.kt: (52, 30): Cannot access 'MapType': it is private in file
e: ../hosted/pub.dartlang.org/map_launcher-2.2.1+1/android/src/main/kotlin/com/alexmiller/map_launcher/MapLauncherPlugin.kt: (53, 13): Cannot access 'MapModel': it is private in file
e: ../hosted/pub.dartlang.org/map_launcher-2.2.1+1/android/src/main/kotlin/com/alexmiller/map_launcher/MapLauncherPlugin.kt: (53, 22): Cannot access 'MapType': it is private in file
e: ../hosted/pub.dartlang.org/map_launcher-2.2.1+1/android/src/main/kotlin/com/alexmiller/map_launcher/MapLauncherPlugin.kt: (53, 30): Cannot access 'MapType': it is private in file
e: ../hosted/pub.dartlang.org/map_launcher-2.2.1+1/android/src/main/kotlin/com/alexmiller/map_launcher/MapLauncherPlugin.kt: (54, 13): Cannot access 'MapModel': it is private in file
e: ../hosted/pub.dartlang.org/map_launcher-2.2.1+1/android/src/main/kotlin/com/alexmiller/map_launcher/MapLauncherPlugin.kt: (54, 22): Cannot access 'MapType': it is private in file
e: ../hosted/pub.dartlang.org/map_launcher-2.2.1+1/android/src/main/kotlin/com/alexmiller/map_launcher/MapLauncherPlugin.kt: (54, 30): Cannot access 'MapType': it is private in file
e: ../hosted/pub.dartlang.org/map_launcher-2.2.1+1/android/src/main/kotlin/com/alexmiller/map_launcher/MapLauncherPlugin.kt: (55, 13): Cannot access 'MapModel': it is private in file
e: ../hosted/pub.dartlang.org/map_launcher-2.2.1+1/android/src/main/kotlin/com/alexmiller/map_launcher/MapLauncherPlugin.kt: (55, 22): Cannot access 'MapType': it is private in file
e: ../hosted/pub.dartlang.org/map_launcher-2.2.1+1/android/src/main/kotlin/com/alexmiller/map_launcher/MapLauncherPlugin.kt: (55, 30): Cannot access 'MapType': it is private in file
e: ../hosted/pub.dartlang.org/map_launcher-2.2.1+1/android/src/main/kotlin/com/alexmiller/map_launcher/MapLauncherPlugin.kt: (56, 13): Cannot access 'MapModel': it is private in file
e: ../hosted/pub.dartlang.org/map_launcher-2.2.1+1/android/src/main/kotlin/com/alexmiller/map_launcher/MapLauncherPlugin.kt: (56, 22): Cannot access 'MapType': it is private in file
e: ../hosted/pub.dartlang.org/map_launcher-2.2.1+1/android/src/main/kotlin/com/alexmiller/map_launcher/MapLauncherPlugin.kt: (56, 30): Cannot access 'MapType': it is private in file
e: ../hosted/pub.dartlang.org/map_launcher-2.2.1+1/android/src/main/kotlin/com/alexmiller/map_launcher/MapLauncherPlugin.kt: (57, 13): Cannot access 'MapModel': it is private in file
e: ../hosted/pub.dartlang.org/map_launcher-2.2.1+1/android/src/main/kotlin/com/alexmiller/map_launcher/MapLauncherPlugin.kt: (57, 22): Cannot access 'MapType': it is private in file
e: ../hosted/pub.dartlang.org/map_launcher-2.2.1+1/android/src/main/kotlin/com/alexmiller/map_launcher/MapLauncherPlugin.kt: (57, 30): Unresolved reference: petal
e: ../hosted/pub.dartlang.org/map_launcher-2.2.1+1/android/src/main/kotlin/com/alexmiller/map_launcher/MapLauncherPlugin.kt: (60, 42): Cannot access 'MapModel': it is private in file
e: ../hosted/pub.dartlang.org/map_launcher-2.2.1+1/android/src/main/kotlin/com/alexmiller/map_launcher/MapLauncherPlugin.kt: (62, 87): Cannot access 'MapModel': it is private in file
e: ../hosted/pub.dartlang.org/map_launcher-2.2.1+1/android/src/main/kotlin/com/alexmiller/map_launcher/MapLauncherPlugin.kt: (68, 47): Cannot access 'MapModel': it is private in file
e: ../hosted/pub.dartlang.org/map_launcher-2.2.1+1/android/src/main/kotlin/com/alexmiller/map_launcher/MapLauncherPlugin.kt: (68, 55): Cannot access 'MapType': it is private in file
e: ../hosted/pub.dartlang.org/map_launcher-2.2.1+1/android/src/main/kotlin/com/alexmiller/map_launcher/MapLauncherPlugin.kt: (81, 36): Cannot access 'MapType': it is private in file
e: ../hosted/pub.dartlang.org/map_launcher-2.2.1+1/android/src/main/kotlin/com/alexmiller/map_launcher/MapLauncherPlugin.kt: (85, 47): Cannot access 'MapType': it is private in file
e: ../hosted/pub.dartlang.org/map_launcher-2.2.1+1/android/src/main/kotlin/com/alexmiller/map_launcher/MapLauncherPlugin.kt: (85, 51): Cannot access 'MapModel': it is private in file
e: ../hosted/pub.dartlang.org/map_launcher-2.2.1+1/android/src/main/kotlin/com/alexmiller/map_launcher/MapLauncherPlugin.kt: (85, 59): No method 'equals(Any?): Boolean' available
e: ../hosted/pub.dartlang.org/map_launcher-2.2.1+1/android/src/main/kotlin/com/alexmiller/map_launcher/MapLauncherPlugin.kt: (86, 17): Cannot access 'MapModel': it is private in file
e: ../hosted/pub.dartlang.org/map_launcher-2.2.1+1/android/src/main/kotlin/com/alexmiller/map_launcher/MapLauncherPlugin.kt: (86, 26): No method 'equals(Any?): Boolean' available
e: ../hosted/pub.dartlang.org/map_launcher-2.2.1+1/android/src/main/kotlin/com/alexmiller/map_launcher/MapLauncherPlugin.kt: (87, 44): Cannot access 'MapModel': it is private in file
e: ../hosted/pub.dartlang.org/map_launcher-2.2.1+1/android/src/main/kotlin/com/alexmiller/map_launcher/MapLauncherPlugin.kt: (99, 63): Cannot access 'MapModel': it is private in file
e: ../hosted/pub.dartlang.org/map_launcher-2.2.1+1/android/src/main/kotlin/com/alexmiller/map_launcher/MapLauncherPlugin.kt: (109, 31): Cannot access 'MapType': it is private in file
e: ../hosted/pub.dartlang.org/map_launcher-2.2.1+1/android/src/main/kotlin/com/alexmiller/map_launcher/MapLauncherPlugin.kt: (109, 39): Cannot access 'MapType': it is private in file

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':map_launcher: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 1m 8s
Exception: Gradle task assembleStagingDebug failed with exit code 1
mattermoran commented 2 years ago

Seems more like some caching issue. Have you tried to run flutter clean and rebuild the project?

tobias-ullerich-init commented 2 years ago

The flutter clean command does the trick. I couldn't imaging that the reason for this issue is a caching problem. Thanks for your instant reply :)