【发布时间】:2021-02-17 05:06:39
【问题描述】:
为什么我无法导入flutter_webrtc.dart?这是我关注的文档https://pub.dev/packages/flutter_webrtc
home.dart
import 'package:flutter_webrtc/flutter_webrtc.dart';
pubspec.yaml
dependencies:
http: ^0.12.2
flutter_section_table_view: ^1.0.3
page_transition: ^1.1.7+6
path_provider: ^1.6.24
cupertino_icons: ^1.0.0
flutter_webrtc: ^0.5.8
flutter:
sdk: flutter
错误提示
C:\Users\Users\AndroidStudioProjects\TossGame\android\app\src\debug\AndroidManifest.xml Error:
uses-sdk:minSdkVersion 16 cannot be smaller than version 21 declared in library [:flutter_webrtc] C:\Users\Users\AndroidStudioProjects\TossGame\build\flutter_webrtc\intermediates\library_manifest\debug\AndroidManifest.xml as the library might be using APIs not available in 16
Suggestion: use a compatible library with a minSdk of at most 16,
or increase this project's minSdk version to at least 21,
or use tools:overrideLibrary="com.cloudwebrtc.webrtc" to force usage (may lead to runtime failures)
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed : uses-sdk:minSdkVersion 16 cannot be smaller than version 21 declared in library [:flutter_webrtc] C:\Users\Users\AndroidStudioProjects\TossGame\build\flutter_webrtc\intermediates\library_manifest\debug\AndroidManifest.xml as the library might be using APIs not available in 16
Suggestion: use a compatible library with a minSdk of at most 16,
or increase this project's minSdk version to at least 21,
or use tools:overrideLibrary="com.cloudwebrtc.webrtc" to force usage (may lead to runtime failures)
* 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 18s
Exception: Gradle task assembleDebug failed with exit code 1
【问题讨论】:
-
@JanviPatel 我已经投票了
-
那是我的