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

unable to import #2

Closed
dss539 opened this issue Mar 5, 2018 · 5 comments
Closed

unable to import #2

dss539 opened this issue Mar 5, 2018 · 5 comments

Comments

@dss539
Copy link

dss539 commented Mar 5, 2018

It seems that I am unable to import from this package.
image

my pubspec includes the correct line, I think...

  location: ^1.1.7
  google_maps_webservice: ^0.0.3

I have no trouble using , e.g., the location package.
Is this a problem with the package, or a problem in my configuration and usage?

@lejard-h
Copy link
Owner

lejard-h commented Mar 5, 2018

Hello,

You missed the semi-column at the end of the import.
If you still have the error, I suggest you to do a pub upgrade

And if it works, you should report the issue on the dart SDK, the import should not fail like that if no ;

@dss539
Copy link
Author

dss539 commented Mar 5, 2018

Thanks for the tip. Unfortunately, I still have the other error.
image

I think the semi-colon was a red herring.

When I have time, I will make a public repo that, I hope, illustrates the issue.

@lejard-h
Copy link
Owner

lejard-h commented Mar 5, 2018

is it possible to share your pubspec.yaml here ?

you can also try to remove .pub, .packages, pubspeck.lock

@dss539
Copy link
Author

dss539 commented Mar 7, 2018

Sorry for the delayed response, and thanks for the help.
I created a new flutter project in Android Studio to reproduce the issue... and it worked fine.
After comparing the two projects, I found absolutely nothing different in regards to this library.
So I tried a few things, such as removing and re-adding entries in the pubspec.yaml, rebuilding the package cache, and re-starting Android studio.
Finally, something worked.

I am certain there is nothing wrong with this package. There may have been something wrong with Android Studio, or it may have been user error, though I have a hard time figuring out what I may have done wrong.

In any case, I no longer have the error. Thanks for your help, and sorry to waste your time.

@shubh420
Copy link

shubh420 commented Oct 8, 2021

Same thing happened with me. I do never get these kind of errors when adding a package in my pubspec file. but for this package I was successfully able to add the package in pubspec file but I was not able to import the files from the package.

Its only when I invalidate and restart the android studio, things started working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants