boyan01 / flutter-netease-music

flutter music player application. (仿网易云音乐)
3.5k stars 852 forks source link

编译不通过 #128

Closed eren000 closed 3 years ago

eren000 commented 3 years ago

报错信息:

e: D:\workspace\flutter\flutter-netease-music\music_service\android\src\main\kotlin\tech\soit\quiet\player\PlayQueue.kt: (182, 19): Java type mismatch expected (Mutable)List<(raw) Any?>! but found MutableList<MusicItem / = MusicMetadata />. Use explicit cast e: D:\workspace\flutter\flutter-netease-music\music_service\android\src\main\kotlin\tech\soit\quiet\player\PlayQueue.kt: (184, 19): Java type mismatch expected (Mutable)List<(raw) Any?>! but found kotlin.collections.ArrayList / = java.util.ArrayList /. Use explicit cast e: D:\workspace\flutter\flutter-netease-music\music_service\android\src\main\kotlin\tech\soit\quiet\player\PlayQueue.kt: (191, 29): Java type mismatch expected (Mutable)List<(raw) Any?>! but found MutableList<MusicItem / = MusicMetadata />. Use explicit cast e: D:\workspace\flutter\flutter-netease-music\music_service\android\src\main\kotlin\tech\soit\quiet\player\PlayQueue.kt: (195, 17): Java type mismatch expected (Mutable)Map<(raw) Any?, (raw) Any?>! but found MutableMap<String, Any>. Use explicit cast e: D:\workspace\flutter\flutter-netease-music\music_service\android\src\main\kotlin\tech\soit\quiet\player\PlayQueue.kt: (199, 57): Java type mismatch expected (Mutable)List<(raw) Any?>! but found MutableList. Use explicit cast

环境:

Flutter 1.23.0-18.0.pre • channel dev • https://github.com/flutter/flutter.git Framework • revision 37ebe3d82a (3 days ago) • 2020-10-13 10:52:23 -0700 Engine • revision 6634406889 Tools • Dart 2.11.0 (build 2.11.0-213.0.dev)

win10

boyan01 commented 3 years ago

我这边试了一下,编译是正常的。

请问你那边有对代码做什么修改么?另外是否使用的是最新 master 的代码呢?

eren000 commented 3 years ago

只改了所有的gradle-wrapper 为 gradle-6.6.1-all.zip ext.kotlin_version 1.3.72 classpath 'com.android.tools.build:gradle:4.1.0' 感觉像是kotlin版本的问题,回头我再试一下吧。

eren000 commented 3 years ago

更新代码后编译通过了

boyan01 commented 3 years ago

好的,那这个 Issue 我就先关闭了。