question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

flutter analyze fails on v1.1.8

See original GitHub issue

After upgrading to v1.1.8 and running analyze, the analyze is failing with the following error:

flutter analyze
Analyzing my-flutter...

  error - Target of URI doesn't exist: 'package:blue_thermal_printer/' - lib\generated_plugin_registrant.dart:8:8 - uri_does_not_exist
  error - Undefined name 'BlueThermalPrinterPlugin' - lib\generated_plugin_registrant.dart:25:3 - undefined_identifier
flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 2.5.1, on Microsoft Windows [Version 10.0.19043.1266], locale en-GB)
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
[√] Chrome - develop for the web
[√] Android Studio (version 2020.3)
[√] Connected device (3 available)

• No issues found!

I’m not sure what this file does but seems very web related:

The generated file looks like this:

//
// Generated file. Do not edit.
//

// ignore_for_file: directives_ordering
// ignore_for_file: lines_longer_than_80_chars

import 'package:blue_thermal_printer/';
import 'package:firebase_auth_web/firebase_auth_web.dart';
import 'package:firebase_core_web/firebase_core_web.dart';
import 'package:firebase_messaging_web/firebase_messaging_web.dart';
import 'package:fluttertoast/fluttertoast_web.dart';
import 'package:google_maps_flutter_web/google_maps_flutter_web.dart';
import 'package:image_picker_for_web/image_picker_for_web.dart';
import 'package:package_info_plus_web/package_info_plus_web.dart';
import 'package:shared_preferences_web/shared_preferences_web.dart';
import 'package:url_launcher_web/url_launcher_web.dart';
import 'package:video_player_web/video_player_web.dart';
import 'package:wakelock_web/wakelock_web.dart';

import 'package:flutter_web_plugins/flutter_web_plugins.dart';

// ignore: public_member_api_docs
void registerPlugins(Registrar registrar) {
  BlueThermalPrinterPlugin.registerWith(registrar);
  FirebaseAuthWeb.registerWith(registrar);
  FirebaseCoreWeb.registerWith(registrar);
  FirebaseMessagingWeb.registerWith(registrar);
  FluttertoastWebPlugin.registerWith(registrar);
  GoogleMapsPlugin.registerWith(registrar);
  ImagePickerPlugin.registerWith(registrar);
  PackageInfoPlugin.registerWith(registrar);
  SharedPreferencesPlugin.registerWith(registrar);
  UrlLauncherPlugin.registerWith(registrar);
  VideoPlayerPlugin.registerWith(registrar);
  WakelockWeb.registerWith(registrar);
  registrar.registerMessageHandler();
}

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
uaandreicommented, Oct 11, 2021

you can try and exclude generated_plugin_registrant.dart from analysis, this worked fine for me.

just add in project root a file named analysis_options.yaml with the following content:

analyzer:
  exclude: [lib/generated_plugin_registrant.dart]

reference: https://betterprogramming.pub/dont-panic-when-flutter-generates-a-bad-file-for-you-e5e314c2b01

0reactions
github-actions[bot]commented, Aug 27, 2022

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 flutter doctor -v and a minimal reproduction of the issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[BUG] flutter analyze exit code -1 in info level #57880 - GitHub
Hi devs, When you run the commad below: flutter analyze Although it only has info level the command return exit code 1 (Fail)...
Read more >
Flutter analyze / build fails in GitHub action - Stack Overflow
When I ran flutter analyze locally, there was not any problem, the process went smoothly. But at GitHub action, flutter analyze starting to...
Read more >
v0.14 - Dart Code - Dart & Flutter support for Visual Studio Code
An error message about the “new driver” will no longer appear when using version v1.22.0-dev.5.0 or later of the Dart SDK.
Read more >
Flutter 1.12.13 release notes
Welcome to Flutter 1.12, our biggest stable release so far! In this release, we've merged 1,905 Pull Requests from 188 contributors, including both...
Read more >
Known issues with Android Studio and Android Gradle Plugin
This error occurs on Linux-based platforms when starting the native debugger. It indicates that one of the libraries required by the native debugger...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found