dingjianjaja / amap_flutter_search

amap_flutter_search
Other
0 stars 10 forks source link

报错 No signature of method: #1

Open zhoujia456888 opened 2 years ago

zhoujia456888 commented 2 years ago

如图,导包运行报错 image

` flutter doctor -v
[✓] Flutter (Channel stable, 3.0.4, on macOS 12.4 21F79 darwin-x64, locale zh-Hans-CN) • Flutter version 3.0.4 at /Users/zhoujia/FlutterProject/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision 85684f9300 (7 天前), 2022-06-30 13:22:47 -0700 • Engine revision 6ba2af10bb • Dart version 2.17.5 • DevTools version 2.12.2 • Pub download mirror https://pub.flutter-io.cn • Flutter download mirror https://storage.flutter-io.cn Checking Android licenses is taking an unexpectedly long time...[!] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1) • Android SDK at /Users/zhoujia/Library/Android/sdk • Platform android-33, build-tools 32.1.0-rc1 • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840) ✗ Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses

[✓] Xcode - develop for iOS and macOS (Xcode 13.4.1) • Xcode at /Applications/Xcode.app/Contents/Developer • CocoaPods version 1.11.3

[✓] Chrome - develop for the web • CHROME_EXECUTABLE = /Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge

[✓] Android Studio (version 2021.2) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)

[✓] VS Code (version 1.69.0) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.44.0

[✓] Connected device (3 available) • Redmi Note 8 Pro (mobile) • mrlvojqwi7hqtkt8 • android-arm64 • Android 11 (API 30) • macOS (desktop) • macos • darwin-x64 • macOS 12.4 21F79 darwin-x64 • Chrome (web) • chrome • web-javascript • Microsoft Edge 103.0.1264.51

[✓] HTTP Host Availability • All required HTTP hosts are available `

zhoujia456888 commented 2 years ago

对比新建的plugin工程,发现需要把build.gradle中的 dependencies { //搜索功能 compile 'com.amap.api:search:latest.integration' } 移到android外面,compile改成implementation 就行 可能是我Gradle版本太高的问题?

wangborong12345 commented 9 months ago

I also encountered this problem