Skip to content
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

Target of URI doesn't exist #49702

Closed
keinou opened this issue Jan 29, 2020 · 8 comments
Closed

Target of URI doesn't exist #49702

keinou opened this issue Jan 29, 2020 · 8 comments

Comments

@keinou
Copy link

keinou commented Jan 29, 2020

Steps to Reproduce

  1. Create a project with two pages.
  2. Add the import of the second file, and create the route for navigation.
  3. Add accented text on the second pag.

Actual results: Target of URI doesn't exist:

info - Unused import: 'dart:convert' - lib\api\autentication.dart:1:8 - unused_import
   info - Unused import: 'dart:ui' - lib\generated_plugin_registrant.dart:4:8 - unused_import
   info - Unused import: 'dart:convert' - lib\model\main\dashdata.dart:1:8 - unused_import
   info - Unused import: 'package:hello/model/global.dart' - lib\model\main\key.dart:2:8 - unused_import
  error - Target of URI doesn't exist: 'package:hello/pages/financeiro/aprov_pagar.dart' - lib\pages\main\home_page.dart:2:8 -
         uri_does_not_exist
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel beta, v1.12.13+hotfix.6, on Microsoft Windows [versão 10.0.18362.592], locale pt-BR)

[√] Android toolchain - develop for Android devices (Android SDK version 29.0.1)
[√] Chrome - develop for the web
[√] Android Studio (version 3.4)
[√] VS Code (version 1.41.1)
[√] Connected device (3 available)

• No issues found!
@VladyslavBondarenko
Copy link

Hi @keinou
But does /pages/financeiro/aprov_pagar.dart exist?
the same if to use relative path? (like ../../financeiro/aprov_pagar.dart)

To better address the issue, would be helpful
if you could post a self contained app on github
Thank you

@VladyslavBondarenko VladyslavBondarenko added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Jan 29, 2020
@keinou
Copy link
Author

keinou commented Jan 29, 2020

Hi @VladyslavBondarenko
I created a project for example of the problem:
https://github.com/keinou/IssueFlutter

This is the problem:
image

If I have the file open, it doesn't happen:
image

In Android Studio he doesn't even recognize it with the file open.
Of course, this only happens if I have accented text, if I remove the file it is normally found.
Remove the accentuation from the text "Confirma a rejeição do titulo?" in other_page.dart and watch.

@no-response no-response bot removed the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Jan 29, 2020
@iapicca
Copy link
Contributor

iapicca commented Jan 30, 2020

Hi @keinou
I cannot reproduce the issue you are describing issues_49702.

Best case scenario it's just a problem with your Android Studio installation;
the annoying workaround might just be reinstalling AS.

If it doesn't solve it being potentially a problem with Android Studio's plugin itself
please follow the indication of jetbrains' Flutter plugin opening an issue on the dedicated github

Closing, as this isn't an issue with Flutter itself,
if you disagree please write in the comments and I will reopen it.
Thank you

@iapicca iapicca closed this as completed Jan 30, 2020
@OliverNarramore
Copy link

I am facing the same issue. My flutter version details are:

Flutter (Channel master, v1.15.4-pre.66, on Mac OS X 10.15.3 19D76, locale en-GB)
• Flutter version 1.15.4-pre.66 at /Users/student/flutter
• Framework revision b340469 (3 days ago), 2020-02-13 18:34:08 -0800
• Engine revision 0e8ed27
• Dart version 2.8.0 (build 2.8.0-dev.8.0 5244d99a5d)

On each project I have certain files flash up red on VS code, stating target of uri doesnt exist. I have the option of importing the correct URI, but with each click it still adds the old, red underlined, uri. The weird thing is, the project will still compile and run despite these errors, and the files in question work on the app.

@OliverNarramore
Copy link

I attempted many of the fixes other users suggested such as clearing cache, running flutter pub get, restarting Xcode etc.

I believe the issue is if the .dart file is inside a folder which contains spaces in its title. For example:
Test File -> test_file.dart

No other files will be able to import test_file.dart, despite it suggesting the the pathway. It simply states "Target of URI doesn't exist"

@zyzhangyu
Copy link

  1. in .yaml file, the top line code is -> name:todo_app.

  2. in main.dart file, import 'package:todo_app/UI/intro_page.dart';

IDEA report this message: Target of URI doesn't exist: 'package:todo_app/UI/intro_page.dart'.

  1. in main.dart file, import 'package:project_name/UI/intro_page.dart' is OK!

@iapicca
Copy link
Contributor

iapicca commented Apr 8, 2020

Could everyone who still has this problem please file a new issue with the exact descriptions what happens, logs and the output of 'flutter doctor -v' please.
All system setups can be slightly different so it's always better to open new issues and reference related issues.

@lock
Copy link

lock bot commented Apr 25, 2020

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.

@lock lock bot locked and limited conversation to collaborators Apr 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants