l3lackcurtains/flutter-for-wordpress-app

error: Target of URI doesn't exist: 'package:share/share.dart'.

Tony-Akani opened this issue · 3 comments

I successfully built the app the first time but the second time this errors showed up please help me,

error: Target of URI doesn't exist: 'package:share/share.dart'. (uri_does_not_exist at [flutter_wordpress_app] lib\pages\settings.dart:2)
error: Undefined name 'Share'. (undefined_identifier at [flutter_wordpress_app] lib\pages\settings.dart:163)
error: Target of URI doesn't exist: 'package:flutter_widget_from_html/flutter_widget_from_html.dart'. (uri_does_not_exist at [flutter_wordpress_app] lib\pages\single_article.dart:7)
error: Target of URI doesn't exist: 'package:share/share.dart'. (uri_does_not_exist at [flutter_wordpress_app] lib\pages\single_article.dart:17)
error: The method 'HtmlWidget' isn't defined for the type '_SingleArticleState'. (undefined_method at [flutter_wordpress_app] lib\pages\single_article.dart:120)
error: The method 'HtmlWidget' isn't defined for the type '_SingleArticleState'. (undefined_method at [flutter_wordpress_app] lib\pages\single_article.dart:138)
error: The method 'HtmlWidget' isn't defined for the type '_SingleArticleState'. (undefined_method at [flutter_wordpress_app] lib\pages\single_article.dart:158)
error: The method 'HtmlWidget' isn't defined for the type '_SingleArticleState'. (undefined_method at [flutter_wordpress_app] lib\pages\single_article.dart:237)
error: Undefined name 'Share'. (undefined_identifier at [flutter_wordpress_app] lib\pages\single_article.dart:329)

when i launched

Launching lib\main.dart on Infinix X652B in debug mode...
Running Gradle task 'assembleDebug'...
lib/pages/single_Article.dart:7:8: Error: Error when reading '../../AppData/Local/Pub/Cache/hosted/pub.dartlang.org/flutter_widget_from_html-0.5.1+3/lib/flutter_widget_from_html.dart': The system cannot find the path specified.

import 'package:flutter_widget_from_html/flutter_widget_from_html.dart';
^
lib/pages/single_article.dart:7:8: Error: Error when reading '../../AppData/Local/Pub/Cache/hosted/pub.dartlang.org/flutter_widget_from_html-0.5.1+3/lib/flutter_widget_from_html.dart': The system cannot find the path specified.

import 'package:flutter_widget_from_html/flutter_widget_from_html.dart';
^
lib/pages/single_Article.dart:120:48: Error: The method 'HtmlWidget' isn't defined for the class '_SingleArticleState'.

  • '_SingleArticleState' is from 'package:flutter_wordpress_app/pages/single_Article.dart' ('lib/pages/single_Article.dart').
    Try correcting the name to the name of an existing method, or defining a method named 'HtmlWidget'.
    child: HtmlWidget(
    ^^^^^^^^^^
    lib/pages/single_Article.dart:138:52: Error: The method 'HtmlWidget' isn't defined for the class '_SingleArticleState'.
  • '_SingleArticleState' is from 'package:flutter_wordpress_app/pages/single_Article.dart' ('lib/pages/single_Article.dart').
    Try correcting the name to the name of an existing method, or defining a method named 'HtmlWidget'.
    child: HtmlWidget(
    ^^^^^^^^^^
    lib/pages/single_Article.dart:158:52: Error: The method 'HtmlWidget' isn't defined for the class '_SingleArticleState'.
  • '_SingleArticleState' is from 'package:flutter_wordpress_app/pages/single_Article.dart' ('lib/pages/single_Article.dart').
    Try correcting the name to the name of an existing method, or defining a method named 'HtmlWidget'.
    child: HtmlWidget(
    ^^^^^^^^^^
    lib/pages/single_Article.dart:237:32: Error: The method 'HtmlWidget' isn't defined for the class '_SingleArticleState'.
  • '_SingleArticleState' is from 'package:flutter_wordpress_app/pages/single_Article.dart' ('lib/pages/single_Article.dart').
    Try correcting the name to the name of an existing method, or defining a method named 'HtmlWidget'.
    child: HtmlWidget(
    ^^^^^^^^^^
    lib/pages/single_article.dart:120:48: Error: The method 'HtmlWidget' isn't defined for the class '_SingleArticleState'.
  • '_SingleArticleState' is from 'package:flutter_wordpress_app/pages/single_article.dart' ('lib/pages/single_article.dart').
    Try correcting the name to the name of an existing method, or defining a method named 'HtmlWidget'.
    child: HtmlWidget(
    ^^^^^^^^^^
    lib/pages/single_article.dart:138:52: Error: The method 'HtmlWidget' isn't defined for the class '_SingleArticleState'.
  • '_SingleArticleState' is from 'package:flutter_wordpress_app/pages/single_article.dart' ('lib/pages/single_article.dart').
    Try correcting the name to the name of an existing method, or defining a method named 'HtmlWidget'.
    child: HtmlWidget(
    ^^^^^^^^^^
    lib/pages/single_article.dart:158:52: Error: The method 'HtmlWidget' isn't defined for the class '_SingleArticleState'.
  • '_SingleArticleState' is from 'package:flutter_wordpress_app/pages/single_article.dart' ('lib/pages/single_article.dart').
    Try correcting the name to the name of an existing method, or defining a method named 'HtmlWidget'.
    child: HtmlWidget(
    ^^^^^^^^^^
    lib/pages/single_article.dart:237:32: Error: The method 'HtmlWidget' isn't defined for the class '_SingleArticleState'.
  • '_SingleArticleState' is from 'package:flutter_wordpress_app/pages/single_article.dart' ('lib/pages/single_article.dart').
    Try correcting the name to the name of an existing method, or defining a method named 'HtmlWidget'.
    child: HtmlWidget(
    ^^^^^^^^^^

FAILURE: Build failed with an exception.

  • Where:
    Script 'C:\src\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 904

  • What went wrong:
    Execution failed for task ':app:compileFlutterBuildDebug'.

Process 'command 'C:\src\flutter\bin\flutter.bat'' finished with non-zero exit value 1

  • 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 4m 22s
Exception: Gradle task assembleDebug failed with exit code 1

Did you fix already ?

Yes Fixed

Great.