Когда я пытаюсь запустить приложение в первый раз, выдается сообщение об ошибке «слияние не удалось: использует-sdk: minSdkVersion 16 не может быть меньше, чем версия 21». Я пытаюсь обновить minSdkVersion 21 в android / app / build. Gradle файл. После обновления файла build.gradle с ошибкой отладки.
Launching lib/main.dart on AOSP on IA Emulator in debug mode...
[!] Your app isn't using AndroidX.
Running Gradle task 'assembleDebug'...
e: /Users/dilrukshi/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/speech_to_text-2.1.0/android/src/main/kotlin/com/csdcorp/speech_to_text/SpeechToTextPlugin.kt: (3, 28): Unresolved reference: NonNull
e: /Users/dilrukshi/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/speech_to_text-2.1.0/android/src/main/kotlin/com/csdcorp/speech_to_text/SpeechToTextPlugin.kt: (16, 22): Unresolved reference: app
e: /Users/dilrukshi/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/speech_to_text-2.1.0/android/src/main/kotlin/com/csdcorp/speech_to_text/SpeechToTextPlugin.kt: (17, 22): Unresolved reference: content
e: /Users/dilrukshi/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/speech_to_text-2.1.0/android/src/main/kotlin/com/csdcorp/speech_to_text/SpeechToTextPlugin.kt: (87, 38): Unresolved reference: NonNull
e: /Users/dilrukshi/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/speech_to_text-2.1.0/android/src/main/kotlin/com/csdcorp/speech_to_text/SpeechToTextPlugin.kt: (117, 40): Unresolved reference: NonNull
e: /Users/dilrukshi/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/speech_to_text-2.1.0/android/src/main/kotlin/com/csdcorp/speech_to_text/SpeechToTextPlugin.kt: (141, 32): Unresolved reference: NonNull
e: /Users/dilrukshi/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/speech_to_text-2.1.0/android/src/main/kotlin/com/csdcorp/speech_to_text/SpeechToTextPlugin.kt: (141, 59): Unresolved reference: NonNull
e: /Users/dilrukshi/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/speech_to_text-2.1.0/android/src/main/kotlin/com/csdcorp/speech_to_text/SpeechToTextPlugin.kt: (183, 27): Unresolved reference: ContextCompat
e: /Users/dilrukshi/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/speech_to_text-2.1.0/android/src/main/kotlin/com/csdcorp/speech_to_text/SpeechToTextPlugin.kt: (346, 35): Unresolved reference: ContextCompat
e: /Users/dilrukshi/Developer/flutter/.pub-cache/hosted/pub.dartlang.org/speech_to_text-2.1.0/android/src/main/kotlin/com/csdcorp/speech_to_text/SpeechToTextPlugin.kt: (353, 17): Unresolved reference: ActivityCompat
FAILURE: Build failed with an exception.
Что пошло не так: выполнение задачи не выполнено ': speech_to_text: compileDebug Kotlin'.
Ошибка компиляции. Более подробную информацию смотрите в журнале
Попробуйте: Запустите с параметром --stacktrace, чтобы получить трассировку стека. Запустите с параметром --info или --debug, чтобы получить больше вывода журнала. Запустите с --scan, чтобы получить полное представление.
Получите дополнительную помощь по https://help.gradle.org
BUILD FAILED in 12s Закончено с ошибкой: сбой задачи GradleDebug с кодом завершения 1
Я не знаю, как это исправить. это первый мобильный ящик. Я перепробовал много решений, но на самом деле ничего не работает для меня. Могу ли я помочь мне исправить эту ошибку?