Я пытаюсь добавить функциональность карты в свой проект. Но я не могу скомпилировать пакет map_view. Сначала была какая-то проблема с kotlin версией gradle и kotlin версией map_view. Я не знаю, если эта проблема все еще там. Но теперь я сталкиваюсь с проблемами с компиляцией пакета.
вот ошибки компиляции
e: D:\Program Files\flutter\.pub-cache\hosted\pub.dartlang.org\map_view-
0.0.14\android\src\main\kotlin\com\apptreesoftware\mapview\MapActivity.kt: (10, 31): Unresolved
reference: ActivityCompat
e: D:\Program Files\flutter\.pub-cache\hosted\pub.dartlang.org\map_view-
0.0.14\android\src\main\kotlin\com\apptreesoftware\mapview\MapActivity.kt: (11, 27): Unresolved
reference: content
e: D:\Program Files\flutter\.pub-cache\hosted\pub.dartlang.org\map_view-
0.0.14\android\src\main\kotlin\com\apptreesoftware\mapview\MapActivity.kt: (12, 24): Unresolved
reference: v7
e: D:\Program Files\flutter\.pub-cache\hosted\pub.dartlang.org\map_view-
0.0.14\android\src\main\kotlin\com\apptreesoftware\mapview\MapActivity.kt: (21, 21): Unresolved
reference: AppCompatActivity
e: D:\Program Files\flutter\.pub-cache\hosted\pub.dartlang.org\map_view-
0.0.14\android\src\main\kotlin\com\apptreesoftware\mapview\MapActivity.kt: (29, 5): 'onCreate'
overrides nothing
e: D:\Program Files\flutter\.pub-cache\hosted\pub.dartlang.org\map_view-
0.0.14\android\src\main\kotlin\com\apptreesoftware\mapview\MapActivity.kt: (30, 15): Unresolved
reference: onCreate
e: D:\Program Files\flutter\.pub-cache\hosted\pub.dartlang.org\map_view-
0.0.14\android\src\main\kotlin\com\apptreesoftware\mapview\MapActivity.kt: (31, 9): Unresolved
reference: setContentView
e: D:\Program Files\flutter\.pub-cache\hosted\pub.dartlang.org\map_view-
0.0.14\android\src\main\kotlin\com\apptreesoftware\mapview\MapActivity.kt: (32, 9): Unresolved
reference: title
e: D:\Program Files\flutter\.pub-cache\hosted\pub.dartlang.org\map_view-
0.0.14\android\src\main\kotlin\com\apptreesoftware\mapview\MapActivity.kt: (33, 27): Unresolved
reference: supportFragmentManager
e: D:\Program Files\flutter\.pub-cache\hosted\pub.dartlang.org\map_view-
0.0.14\android\src\main\kotlin\com\apptreesoftware\mapview\MapActivity.kt: (37, 18): Unresolved
reference: supportActionBar
e: D:\Program Files\flutter\.pub-cache\hosted\pub.dartlang.org\map_view-
0.0.14\android\src\main\kotlin\com\apptreesoftware\mapview\MapActivity.kt: (47, 17): Unresolved
reference: ContextCompat
e: D:\Program Files\flutter\.pub-cache\hosted\pub.dartlang.org\map_view-
0.0.14\android\src\main\kotlin\com\apptreesoftware\mapview\MapActivity.kt: (51, 17): Unresolved
reference: ActivityCompat
e: D:\Program Files\flutter\.pub-cache\hosted\pub.dartlang.org\map_view-
0.0.14\android\src\main\kotlin\com\apptreesoftware\mapview\MapActivity.kt: (108, 5):
'onCreateOptionsMenu' overrides nothing
e: D:\Program Files\flutter\.pub-cache\hosted\pub.dartlang.org\map_view-
0.0.14\android\src\main\kotlin\com\apptreesoftware\mapview\MapActivity.kt: (113, 22): Unresolved
reference: onCreateOptionsMenu
e: D:\Program Files\flutter\.pub-cache\hosted\pub.dartlang.org\map_view-
0.0.14\android\src\main\kotlin\com\apptreesoftware\mapview\MapActivity.kt: (117, 5):
'onOptionsItemSelected' overrides nothing
e: D:\Program Files\flutter\.pub-cache\hosted\pub.dartlang.org\map_view-
0.0.14\android\src\main\kotlin\com\apptreesoftware\mapview\MapActivity.kt: (122, 5): 'onDestroy'
overrides nothing
e: D:\Program Files\flutter\.pub-cache\hosted\pub.dartlang.org\map_view-
0.0.14\android\src\main\kotlin\com\apptreesoftware\mapview\MapActivity.kt: (123, 15): Unresolved
reference: onDestroy
e: D:\Program Files\flutter\.pub-cache\hosted\pub.dartlang.org\map_view-
0.0.14\android\src\main\kotlin\com\apptreesoftware\mapview\MapActivity.kt: (461, 5):
'onRequestPermissionsResult' overrides nothing
e: D:\Program Files\flutter\.pub-cache\hosted\pub.dartlang.org\map_view-
0.0.14\android\src\main\kotlin\com\apptreesoftware\mapview\MapActivity.kt: (471, 27): Unresolved
reference: onRequestPermissionsResult
e: D:\Program Files\flutter\.pub-cache\hosted\pub.dartlang.org\map_view-
0.0.14\android\src\main\kotlin\com\apptreesoftware\mapview\MapViewPlugin.kt: (188, 30): Unresolved
reference: finish
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':map_view:compileDebugKotlin'.
> Compilation error. See log for more details
вот pubspe c .yaml: (без пакета map_view проект строится успешно
name: flutter_course
description: A new Flutter project.
dependencies:
flutter:
sdk: flutter
cupertino_icons: ^0.1.0
scoped_model: ^1.0.1
http: "^0.11.3+16"
shared_preferences: ^0.5.6+3
rxdart: ^0.23.1
map_view: ^0.0.14
google_maps_flutter: ^0.5.25+3
dev_dependencies:
flutter_test:
sdk: flutter
flutter:
uses-material-design: true
assets:
- assets/food.jpg
- assets/background.jpg
fonts:
- family: Oswald
fonts:
- asset: assets/Oswald-Bold.ttf
weight: 700
вот андроид / build.gradle
buildscript {
ext.kotlin_version = "1.3.50"
repositories {
google()
center()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.0'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.1.2-4' }
}
allprojects {
repositories {
google()
center()
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}
task clean(type: Delete) {
delete rootProject.buildDir
}