Skip to content

Internation­alizing Flutter Issue: Target of URI doesn't exist: 'package:flutter_localizations/flutter_localizations.dart'. #40154

Closed

Description

@campio97

Hello,
I'm trying to include the flutter_localizations package in my project.
When i import 'package:flutter_localizations/flutter_localizations.dart'. in my main.dart file, visual studio say: "Target of URI doesn't exist: 'package:flutter_localizations/flutter_localizations.dart'.".

I added the depencie in the pubspec.yaml file and ran the command flutter pub get .
All the other packages under "dependencies" in pubspec.yaml file work.

pubspec.yaml

dependencies:
___flutter:
______sdk: flutter
___flutter_localizations:
______sdk: flutter
___flutter_cupertino_localizations: ^1.0.1 Doesn't work too.
.
.
.

flutter doctor -v
[√] Flutter (Channel dev, v1.8.4, on Microsoft Windows [Versione 10.0.18362.295], locale it-IT)
    • Flutter version 1.8.4 at C:\flutter
    • Framework revision 954714c967 (6 weeks ago), 2019-08-02 10:10:39 -0700
    • Engine revision 26368225b5
    • Dart version 2.5.0 (build 2.5.0-dev.1.0 bd049f5b53)

 
[√] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    • Android SDK at C:\Users\Pietro\AppData\Local\Android\Sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-29, build-tools 29.0.2
    • ANDROID_HOME = C:\Users\Pietro\AppData\Local\Android\Sdk
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)
    • All Android licenses accepted.

[√] Android Studio (version 3.5)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin version 39.0.3
    • Dart plugin version 191.8423
    • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b03)

[√] VS Code (version 1.38.0)
    • VS Code at C:\Users\Pietro\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.4.1

[!] Connected device
    ! No devices available

! Doctor found issues in 1 category.

Activity

  1. BondarenkoStas commented on Sep 10, 2019

    @BondarenkoStas

    @campio97 Please try flutter packages upgrade and then restart VS

  2. added
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Sep 10, 2019
  3. campio97 commented on Sep 10, 2019

    @campio97
    Author

    I restarted VS and now it works.
    Thank you @BondarenkoStas.

  4. removed
    waiting for responseThe Flutter team cannot make further progress on this issue until the original reporter responds
    on Sep 10, 2019
  5. ahmedmehanna commented on Mar 24, 2020

    @ahmedmehanna

    First I tried flutter packages upgrade then I got an error

    Because mobile_app depends on flutter_localizations any from sdk which depends on intl 0.16.0
    

    So, I fixed it by removing intl 0.16.0 package from pubspec.yaml

  6. jimneylee commented on Apr 8, 2020

    @jimneylee

    Same to Android Studio. Just restart AS then click [get dependencies], and it works.
    C01B533E-37D7-4B41-8DB0-E57A44356E73

  7. lock commented on Apr 25, 2020

    @lock

    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.

  8. locked and limited conversation to collaborators on Apr 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions