-
Notifications
You must be signed in to change notification settings - Fork 28.5k
[camera][android] Unit tests fail #71709
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi @svenjacobs |
Output of
(by the way, the warning is wrong. Flutter & Dart plugins are installed in Android Studio) The example project can be found here. Please run |
Hi @svenjacobs logsPS C:\Users\Taha> cd C:\Users\Taha\AndroidStudioProjects\flutter-camera-issue-71709\flutter\.android
PS C:\Users\Taha\AndroidStudioProjects\flutter-camera-issue-71709\flutter\.android> ./gradlew test
Welcome to Gradle 5.6.2!
Here are the highlights of this release:
- Incremental Groovy compilation
- Groovy compile avoidance
- Test fixtures for Java projects
- Manage plugin versions via settings script
For more details see https://docs.gradle.org/5.6.2/release-notes.html
> Task :camera:compileDebugUnitTestJavaWithJavac FAILED
C:\Users\Taha\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\camera-0.5.8+17\android\src\test\java\io\flutter\plugins\camera\DartMessengerTest.java:99: 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
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':camera:compileDebugUnitTestJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
* 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 1m 10s
115 actionable tasks: 85 executed, 30 up-to-date
PS C:\Users\Taha\AndroidStudioProjects\flutter-camera-issue-71709\flutter\.android> flutter doctor -v[✓] Flutter (Channel stable, 1.22.4, on Microsoft Windows [Version 10.0.19042.630], locale en-US)
• Flutter version 1.22.4 at C:\Code\flutter_stable
• Framework revision 1aafb3a8b9 (3 weeks ago), 2020-11-13 09:59:28 -0800
• Engine revision 2c956a31c0
• Dart version 2.10.4
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
• Android SDK at C:\Code\sdk
• Platform android-30, build-tools 30.0.2
• ANDROID_HOME = C:\Code\sdk
• Java binary at: C:\Code\android-studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
• All Android licenses accepted.
[!] Android Studio (version 4.1.0)
• Android Studio at C:\Code\android-studio
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
[✓] VS Code (version 1.51.1)
• VS Code at C:\Users\Taha\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.17.0
[✓] Connected device (1 available)
• sdk gphone x86 (mobile) • emulator-5556 • android-x86 • Android 11 (API 30) (emulator)
! Doctor found issues in 1 category. |
Fixed with PR flutter/plugins#3316. |
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of |
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: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.
The text was updated successfully, but these errors were encountered: