Package import - Target of URI does not exists

Multi tool use
Multi tool use


Package import - Target of URI does not exists



Please check my project:



https://github.com/MaximGo/WebTech_Projekt.git



In the file 'tetrisclient.dart' I want to import the generated package from the lib-folder.


import 'package:tetris/tetris.dart';



But I get the Erro 'Target of URI does not exists'



Thanks for your help!





Is there a reason you deleted your previous question to create the same again? There is an edit link below your question, just below the [dart] tag.
– Günter Zöchbauer
Jun 23 '15 at 13:16



edit





@GünterZöchbauer I tried to use onlye lowercase filenames. But it only works once time. But I have the same problem again. Sorry!
– PeterP
Jun 23 '15 at 13:21





Using lowercase was just a general hint, not specific to your problem. My answer to your problem was using pub get like Alexanders.
– Günter Zöchbauer
Jun 23 '15 at 13:28



pub get





try "pub cache repair", this should help
– ashokd
Jun 23 '15 at 20:41





@ashokd how to run "pub cache repair"?
– PeterP
Jun 23 '15 at 23:09




5 Answers
5



I know this is an old question, but I came across it and resolved it. But anyone that runs into this, simply close your project and reopen it. That solved it for me. I'm using Android Studio.



Run pub get. If you use WebStorm you can do it using corresponding action from the pubspec.yaml file context menu.





No I use the Dart Editor. I tried to run pub get but I get the same error again.
– PeterP
Jun 23 '15 at 13:24



Solution: restart Android Studio. Or: just close and reopen project.



Had similar problem. For anyone who want to investigate, here my steps.
I decided to try that library https://pub.dartlang.org/packages/path_provider



I added dependency and download package via Android Studio. I also see path_provider.dart in External Libraries in my project. So, the file exist! But Studio show me an error "Target of URI doesn't exist" - how to fix it?


import 'package:path_provider/path_provider.dart';



I use example code from path_provider project: https://pub.dartlang.org/packages/path_provider#-example-tab-



If you are copying code from codelabs by Google. You need to take care of remember spaces.



E.g. in pubspec.yaml


pubspec.yaml



this:


flutter:
sdk: flutter

cupertino_icons: ^0.1.0
english_words: ^3.1.0 # add this line



is not this:


flutter:
sdk: flutter

cupertino_icons: ^0.1.0
english_words: ^3.1.0 # add this line



I had the same problem when using Visual Code and following the Write your first app tutorial. This issue was resolved by just closing and reopening the project.






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

xjySxkZMDJGb4XgMD70i0,Lp2hBj AioHtAl,a8iuv N bmkCc8WJFqpLTKiGRhF6zO GDz 3K SXAO,Cx8,yVr6yTbV60 cvYkCJsuH
otvx,Lfa4m,E,MyNXN3FnDAWF u6 YiSGIP04Fr6nzae29e WgslF9Y8,xYUx59jNINDYaO QO2K

Popular posts from this blog

PHP contact form sending but not receiving emails

Do graphics cards have individual ID by which single devices can be distinguished?

Create weekly swift ios local notifications