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

Dart file #16

Open
Sharekaswaby opened this issue Jun 17, 2020 · 5 comments
Open

Dart file #16

Sharekaswaby opened this issue Jun 17, 2020 · 5 comments

Comments

@Sharekaswaby
Copy link

When I clone the dicee code and open it in android studio, there is no dart file. How do I fix this?

@AlexDartmoor
Copy link

Sharekaswaby, I have had the same problem every time I clone a project. Hopefully your problem is the same as mine, and this is the solution which works for me:

Problems getting projects to open up from Version Control.

  1. Open the cloned project
  2. Find the cloned files in a separate documents window (not in Android Studio).
  3. In Documents file - find a file in here called 'main.dart' (probably in the folder named lib).
  4. Drag and drop the main.dart file into the space on Android Studio where you write the code. This should bring up the code as it appears in the tutorial.
  5. It may now say that Dart SDK is not configured. If it does, in Android Studio go to File>Settings>Languages & Frameworks>Dart.
  6. Click on the box 'Enable Dart support for the project ….........'
  7. You will need to input the Dart SDK path. This is probably: C:\src\flutter\flutter\bin\cache\dart-sdk
  8. If the above path suggestion doesn't work, open up a different, working Flutter project in Android studio. Find the correct path within this project - File>Settings>Languages & Frameworks>Dart.
  9. Copy and paste the path from this working project into the project you are trying to get to work.
  10. Then click the boxes 'Enable Dart Support for the following modules.
  11. Click 'OK'
  12. It should now work.
  13. Remember to now click 'Get Dependencies' at top of the screen

I really do help this solves your issue. It took a few hours to figure this one out with the mi-card project and so I do hope I can help save someone else this frustration! Please do let me know if this worked!

Thanks,
Alex

@Sharekaswaby
Copy link
Author

Sharekaswaby commented Jun 20, 2020 via email

@AlexDartmoor
Copy link

Hi Sharon, it sounds like you need to 'configure' Dart.
My instructions above resolve this. See step 5 onwards in my instructions above. Apologies if they don't make sense - let me know if anything needs to be clearer.

You may not have Dart installed at all. In which case you need to install Dart:
In Android Studio:

  1. File > Settings > Plugins
  2. Find 'Plugins Marketplace' at the top of the window and search 'Dart'.
  3. Follow the installation steps for installing Dart. There are earlier videos in this AppBrewery Course which cover the installation of Dart and Flutter.

Hope this helps,
Alex

@Sharekaswaby
Copy link
Author

Sharekaswaby commented Jun 23, 2020 via email

@AlexDartmoor
Copy link

Hi Shareka,

Perhaps you could share a screenshot when Android Studio is telling you to 'add configurations'. It's hard to know what to suggest from here without further information.
I'm sorry you are stuck - I know how frustrating it can be! I will help if I can. I also suggest sharing any problem you have on Stack Exchange (with screenshots) as someone there is bound to know A LOT more than me!

Kind regards,
Alex

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

2 participants