build android error
Closed this issue · 0 comments
tbm98 commented
I got this error when build for android
C:\Users\tbm\AppData\Local\Pub\Cache\git\flutter-music-player-fd425d55d43f121b5ab3bc9ab878e20448fe3e61\android\src\main\kotlin\tech\soit\quiet\MusicPlayerServicePlugin.kt: (91, 33): Type mismatch: inferred type is Map<String, Any>? but Map<String, Any> was expected
e: C:\Users\tbm\AppData\Local\Pub\Cache\git\flutter-music-player-fd425d55d43f121b5ab3bc9ab878e20448fe3e61\android\src\main\kotlin\tech\soit\quiet\MusicPlayerUiPlugin.kt: (75, 68): Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type Number?
e: C:\Users\tbm\AppData\Local\Pub\Cache\git\flutter-music-player-fd425d55d43f121b5ab3bc9ab878e20448fe3e61\android\src\main\kotlin\tech\soit\quiet\MusicPlayerUiPlugin.kt: (76, 53): Type mismatch: inferred type is Int? but Int was expected
e: C:\Users\tbm\AppData\Local\Pub\Cache\git\flutter-music-player-fd425d55d43f121b5ab3bc9ab878e20448fe3e61\android\src\main\kotlin\tech\soit\quiet\MusicPlayerUiPlugin.kt: (76, 58): Type mismatch: inferred type is Int? but Int was expected
e: C:\Users\tbm\AppData\Local\Pub\Cache\git\flutter-music-player-fd425d55d43f121b5ab3bc9ab878e20448fe3e61\android\src\main\kotlin\tech\soit\quiet\MusicPlayerUiPlugin.kt: (77, 65): Type mismatch: inferred type is Map<String, Any>? but DartObject /* = Map<String, Any?> */ was expected
e: C:\Users\tbm\AppData\Local\Pub\Cache\git\flutter-music-player-fd425d55d43f121b5ab3bc9ab878e20448fe3e61\android\src\main\kotlin\tech\soit\quiet\MusicPlayerUiPlugin.kt: (78, 68): Type mismatch: inferred type is Map<String, Any?>? but Map<String, Any?> was expected
e: C:\Users\tbm\AppData\Local\Pub\Cache\git\flutter-music-player-fd425d55d43f121b5ab3bc9ab878e20448fe3e61\android\src\main\kotlin\tech\soit\quiet\MusicPlayerUiPlugin.kt: (79, 76): Type mismatch: inferred type is Map<String, Any?>? but Map<String, Any?> was expected
e: C:\Users\tbm\AppData\Local\Pub\Cache\git\flutter-music-player-fd425d55d43f121b5ab3bc9ab878e20448fe3e61\android\src\main\kotlin\tech\soit\quiet\MusicPlayerUiPlugin.kt: (81, 43): Type mismatch: inferred type is Map<String, Any?>? but Map<String, Any?> was expected
e: C:\Users\tbm\AppData\Local\Pub\Cache\git\flutter-music-player-fd425d55d43f121b5ab3bc9ab878e20448fe3e61\android\src\main\kotlin\tech\soit\quiet\MusicPlayerUiPlugin.kt: (84, 64): Type mismatch: inferred type is Double? but Double was expected
e: C:\Users\tbm\AppData\Local\Pub\Cache\git\flutter-music-player-fd425d55d43f121b5ab3bc9ab878e20448fe3e61\android\src\main\kotlin\tech\soit\quiet\utils\ChannelExt.kt: (16, 45): Object is not abstract and does not implement abstract member public abstract fun error(p0: String, p1: String?, p2: Any?): Unit defined in io.flutter.plugin.common.MethodChannel.Result
e: C:\Users\tbm\AppData\Local\Pub\Cache\git\flutter-music-player-fd425d55d43f121b5ab3bc9ab878e20448fe3e61\android\src\main\kotlin\tech\soit\quiet\utils\ChannelExt.kt: (22, 17): 'error' overrides nothing
doctor:
[√] Flutter (Channel stable, 3.0.4, on Microsoft Windows [Version 10.0.19044.1806], locale en-US)
• Flutter version 3.0.4 at C:\Users\tbm\fvm\default
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 85684f9300 (13 days ago), 2022-06-30 13:22:47 -0700
• Engine revision 6ba2af10bb
• Dart version 2.17.5
• DevTools version 2.12.2
[√] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
• Android SDK at C:\Users\tbm\AppData\Local\Android\sdk
• Platform android-33, build-tools 33.0.0
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 11.0.12+7-b1504.28-7817840)
• All Android licenses accepted.
[√] Chrome - develop for the web
• Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe
[!] Visual Studio - develop for Windows (Visual Studio Community 2022 17.2.6)
• Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
• Visual Studio Community 2022 version 17.2.32630.192
• Windows 10 SDK version 10.0.19041.0
X Visual Studio is missing necessary components. Please re-run the Visual Studio installer for the "Desktop
development with C++" workload, and include these components:
MSVC v142 - VS 2019 C++ x64/x86 build tools
- If there are multiple build tool versions available, install the latest
C++ CMake tools for Windows
Windows 10 SDK
[√] Android Studio (version 2021.2)
• Android Studio at C:\Program Files\Android\Android Studio
• 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+7-b1504.28-7817840)
[√] VS Code (version 1.69.0)
• VS Code at C:\Users\tbm\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.44.0
[√] Connected device (4 available)
• sdk gphone64 x86 64 (mobile) • emulator-5554 • android-x64 • Android 13 (API 33) (emulator)
• Windows (desktop) • windows • windows-x64 • Microsoft Windows [Version 10.0.19044.1806]
• Chrome (web) • chrome • web-javascript • Google Chrome 103.0.5060.114
• Edge (web) • edge • web-javascript • Microsoft Edge 103.0.1264.37
[√] HTTP Host Availability
• All required HTTP hosts are available
! Doctor found issues in 1 category.