Closed
Description
I'm integrating a Flutter module into an Android app in an "add 2 app" situation. After adding camera
(0.5.8+11) to the Flutter module, the Android unit tests fail. When running ./gradlew test
in my Android project I get the following error:
> Task :camera:compileDebugUnitTestJavaWithJavac FAILED
/Users/sven/.pub-cache/hosted/pub.dartlang.org/camera-0.5.8+11/android/src/test/java/io/flutter/plugins/camera/DartMessengerTest.java:103: warning: [unchecked] unchecked cast
return (Map<String, String>) StandardMethodCodec.INSTANCE.decodeEnvelope(sentMessage);
^
required: Map<String,String>
found: Object
error: warnings found and -Werror specified
1 error
1 warning
I'm wondering how this failing unit test was not discovered yet because the unchecked cast is ignored in the test's source code but obviously warnings are treated as errors.
Flutter version 1.22.4.