Skip to content
This repository has been archived by the owner on Oct 10, 2020. It is now read-only.

[Bug] build warnings: [unchecked] unchecked conversion and unchecked call #276

Open
2 tasks
lukaskurz opened this issue Aug 19, 2020 · 0 comments
Open
2 tasks
Labels

Comments

@lukaskurz
Copy link

BUG REPORTS WITHOUT PROVIDING THESE INFORMATIONS WILL BE CLOSED DIRECTLY. DON'T REMOVE THE SECTIONS!

Describe the bug
Building reveals warnings

Note: Some input files use unchecked or unsafe operations.              
Note: Recompile with -Xlint:unchecked for details.

To Reproduce
Steps to reproduce the behavior:

  1. Install barcode_scan
  2. Run flutter build apk

Expected behavior
I expected no build warnings from the library code.

Screenshots
If applicable, add screenshots to help explain your problem.

Logs
Building with "-Xlint:unchecked" in project level build.gradle

Build log

Deleting build... 270ms
Deleting .dart_tool... 14ms
Deleting Generated.xcconfig... 0ms
Deleting flutter_export_environment.sh... 0ms
Running "flutter pub get" in app... 0.5s
Precompiling executable...
Precompiled build_runner:build_runner.
[INFO] Generating build script...
[INFO] Generating build script completed, took 256ms

[INFO] Creating build script snapshot......
[INFO] Creating build script snapshot... completed, took 9.1s

[INFO] Initializing inputs
[INFO] Building new asset graph...
[INFO] Building new asset graph completed, took 570ms

[INFO] Checking for unexpected pre-existing outputs....
[INFO] Checking for unexpected pre-existing outputs. completed, took 0ms

[INFO] Running build...
[INFO] Generating SDK summary...
[INFO] 2.4s elapsed, 0/16 actions completed.
[INFO] Generating SDK summary completed, took 2.4s

[INFO] 3.5s elapsed, 1/17 actions completed.
[INFO] 4.5s elapsed, 4/20 actions completed.
[INFO] 5.6s elapsed, 7/23 actions completed.
[INFO] 6.6s elapsed, 8/24 actions completed.
[INFO] 9.0s elapsed, 8/24 actions completed.
[INFO] 12.8s elapsed, 9/24 actions completed.
[INFO] 13.9s elapsed, 40/47 actions completed.
[INFO] Running build completed, took 14.6s

[INFO] Caching finalized dependency graph...
[INFO] Caching finalized dependency graph completed, took 52ms

[INFO] Succeeded after 14.6s with 12 outputs (147 actions)

Precompiling executable...
Precompiled flutter_launcher_icons:main.
Android minSdkVersion = 18
Creating default icons Android
Adding a new Android launcher icon
Overwriting default iOS launcher icon with new icon
You are building a fat APK that includes binaries for android-arm, android-arm64, android-x64.
If you are deploying the app to the Play Store, it's recommended to use app bundles or split the APK to reduce the APK size.
To generate an app bundle, run:
flutter build appbundle --target-platform android-arm,android-arm64,android-x64
Learn more on: https://developer.android.com/guide/app-bundle
To split the APKs per ABI, run:
flutter build apk --target-platform android-arm,android-arm64,android-x64 --split-per-abi
Learn more on: https://developer.android.com/studio/build/configure-apk-splits#configure-abi-split
/home/lukaskurz/coding/demoproject/app/build/barcode_scan/generated/source/proto/release/javalite/de/mintware/barcode_scan/ConfigurationOuterClass.java:1231: warning: [unchecked] unchecked call to DefaultInstanceBasedParser(T) as a member of the raw type DefaultInstanceBasedParser
PARSER = new DefaultInstanceBasedParser(DEFAULT_INSTANCE);
^
where T is a type-variable:
T extends GeneratedMessageLite<T,?> declared in class DefaultInstanceBasedParser
/home/lukaskurz/coding/demoproject/app/build/barcode_scan/generated/source/proto/release/javalite/de/mintware/barcode_scan/ConfigurationOuterClass.java:1231: warning: [unchecked] unchecked conversion
PARSER = new DefaultInstanceBasedParser(DEFAULT_INSTANCE);
^
required: Parser
found: DefaultInstanceBasedParser
/home/lukaskurz/coding/demoproject/app/build/barcode_scan/generated/source/proto/release/javalite/de/mintware/barcode_scan/AndroidConfigurationOuterClass.java:396: warning: [unchecked] unchecked call to DefaultInstanceBasedParser(T) as a member of the raw type DefaultInstanceBasedParser
PARSER = new DefaultInstanceBasedParser(DEFAULT_INSTANCE);
^
where T is a type-variable:
T extends GeneratedMessageLite<T,?> declared in class DefaultInstanceBasedParser
/home/lukaskurz/coding/demoproject/app/build/barcode_scan/generated/source/proto/release/javalite/de/mintware/barcode_scan/AndroidConfigurationOuterClass.java:396: warning: [unchecked] unchecked conversion
PARSER = new DefaultInstanceBasedParser(DEFAULT_INSTANCE);
^
required: Parser
found: DefaultInstanceBasedParser
/home/lukaskurz/coding/demoproject/app/build/barcode_scan/generated/source/proto/release/javalite/de/mintware/barcode_scan/ScanResultOuterClass.java:884: warning: [unchecked] unchecked call to DefaultInstanceBasedParser(T) as a member of the raw type DefaultInstanceBasedParser
PARSER = new DefaultInstanceBasedParser(DEFAULT_INSTANCE);
^
where T is a type-variable:
T extends GeneratedMessageLite<T,?> declared in class DefaultInstanceBasedParser
/home/lukaskurz/coding/demoproject/app/build/barcode_scan/generated/source/proto/release/javalite/de/mintware/barcode_scan/ScanResultOuterClass.java:884: warning: [unchecked] unchecked conversion
PARSER = new DefaultInstanceBasedParser(DEFAULT_INSTANCE);
^
required: Parser
found: DefaultInstanceBasedParser
/home/lukaskurz/coding/demoproject/app/build/barcode_scan/generated/source/proto/release/javalite/de/mintware/barcode_scan/Protos.java:645: warning: [unchecked] unchecked call to DefaultInstanceBasedParser(T) as a member of the raw type DefaultInstanceBasedParser
PARSER = new DefaultInstanceBasedParser(DEFAULT_INSTANCE);
^
where T is a type-variable:
T extends GeneratedMessageLite<T,?> declared in class DefaultInstanceBasedParser
/home/lukaskurz/coding/demoproject/app/build/barcode_scan/generated/source/proto/release/javalite/de/mintware/barcode_scan/Protos.java:645: warning: [unchecked] unchecked conversion
PARSER = new DefaultInstanceBasedParser(DEFAULT_INSTANCE);
^
required: Parser
found: DefaultInstanceBasedParser
/home/lukaskurz/coding/demoproject/app/build/barcode_scan/generated/source/proto/release/javalite/de/mintware/barcode_scan/Protos.java:1902: warning: [unchecked] unchecked call to DefaultInstanceBasedParser(T) as a member of the raw type DefaultInstanceBasedParser
PARSER = new DefaultInstanceBasedParser(DEFAULT_INSTANCE);
^
where T is a type-variable:
T extends GeneratedMessageLite<T,?> declared in class DefaultInstanceBasedParser
/home/lukaskurz/coding/demoproject/app/build/barcode_scan/generated/source/proto/release/javalite/de/mintware/barcode_scan/Protos.java:1902: warning: [unchecked] unchecked conversion
PARSER = new DefaultInstanceBasedParser(DEFAULT_INSTANCE);
^
required: Parser
found: DefaultInstanceBasedParser
/home/lukaskurz/coding/demoproject/app/build/barcode_scan/generated/source/proto/release/javalite/de/mintware/barcode_scan/Protos.java:2728: warning: [unchecked] unchecked call to DefaultInstanceBasedParser(T) as a member of the raw type DefaultInstanceBasedParser
PARSER = new DefaultInstanceBasedParser(DEFAULT_INSTANCE);
^
where T is a type-variable:
T extends GeneratedMessageLite<T,?> declared in class DefaultInstanceBasedParser
/home/lukaskurz/coding/demoproject/app/build/barcode_scan/generated/source/proto/release/javalite/de/mintware/barcode_scan/Protos.java:2728: warning: [unchecked] unchecked conversion
PARSER = new DefaultInstanceBasedParser(DEFAULT_INSTANCE);
^
required: Parser
found: DefaultInstanceBasedParser
12 warnings
/usr/share/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-5.5.0/android/src/main/java/io/flutter/plugins/urllauncher/WebViewActivity.java:41: warning: [deprecation] shouldOverrideUrlLoading(WebView,String) in WebViewClient has been deprecated
public boolean shouldOverrideUrlLoading(WebView view, String url) {
^
/usr/share/flutter/.pub-cache/hosted/pub.dartlang.org/url_launcher-5.5.0/android/src/main/java/io/flutter/plugins/urllauncher/WebViewActivity.java:46: warning: [deprecation] shouldOverrideUrlLoading(WebView,String) in WebViewClient has been deprecated
return super.shouldOverrideUrlLoading(view, url);
^
2 warnings
Removed unused resources: Binary resource data reduced from 977KB to 907KB: Removed 7%
Running Gradle task 'assembleRelease'...
Running Gradle task 'assembleRelease'... Done 46.0s
✓ Built build/app/outputs/flutter-apk/app-release.apk (21.8MB).

Environment (please complete the following information):

  • iOS? Version: ...
  • Android? Version: ...
  • Version of barcode_scan: barcode_scan: ^3.0.1
  • Output of flutter --version:
Flutter 1.20.1 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 2ae34518b8 (2 weeks ago) • 2020-08-05 19:53:19 -0700
Engine • revision c8e3b94853
Tools • Dart 2.9.0
  • Output of flutter doctor -v
flutter doctor -v
[✓] Flutter (Channel stable, 1.20.1, on Linux, locale en_US.UTF-8)
    • Flutter version 1.20.1 at /usr/share/flutter
    • Framework revision 2ae34518b8 (2 weeks ago), 2020-08-05 19:53:19 -0700
    • Engine revision c8e3b94853
    • Dart version 2.9.0

 
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
    • Android SDK at /home/lukaskurz/Android/Sdk
    • Platform android-29, build-tools 29.0.3
    • Java binary at: /usr/share/android-studio/jre/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)
    • All Android licenses accepted.

[✓] Android Studio (version 3.6)
    • Android Studio at /usr/share/android-studio
    • Flutter plugin version 45.0.1
    • Dart plugin version 192.7761
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b4-5784211)

[✓] VS Code (version 1.47.3)
    • VS Code at /usr/share/code
    • Flutter extension version 3.13.2

Additional context
Add any other context about the problem here.

@lukaskurz lukaskurz added the bug label Aug 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant