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 file "lib/main.dart" not found. #36982

Closed
HeVTion opened this issue Jul 26, 2019 · 4 comments
Closed

Target file "lib/main.dart" not found. #36982

HeVTion opened this issue Jul 26, 2019 · 4 comments

Comments

@HeVTion
Copy link

HeVTion commented Jul 26, 2019

///这个是报错信息 This is an error message flutter build apk

C:\Users\acer\Desktop\MyGit\Code\flutter_app>flutter build apk
Target file "lib/main.dart" not found.

C:\Users\acer\Desktop\MyGit\Code\flutter_app>flutter build apk
Target file "lib/main.dart" not found.

C:\Users\acer\Desktop\MyGit\Code\flutter_app>

///doctor

D:\Flutter\flutter\bin\flutter.bat doctor --verbose
[√] Flutter (Channel stable, v1.7.8+hotfix.4, on Microsoft Windows [Version 10.0.17134.885], locale zh-CN)
    • Flutter version 1.7.8+hotfix.4 at D:\Flutter\flutter
    • Framework revision 20e59316b8 (7 days ago), 2019-07-18 20:04:33 -0700
    • Engine revision fee001c93f
    • Dart version 2.4.0

[!] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    • Android SDK at D:/Android/sdk
    • Android NDK location not configured (optional; useful for native profiling support)
    • Platform android-Q, build-tools 28.0.3
    • ANDROID_HOME = D:/Android/sdk
    • Java binary at: D:\Android\android studio 3.4 rel\android-studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
    ! Some Android licenses not accepted.  To resolve this, run: flutter doctor --android-licenses

[√] Android Studio (version 3.4)
    • Android Studio at D:\Android\android studio 3.4 rel\android-studio
    • Flutter plugin version 37.0.1
    • Dart plugin version 183.6270
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)

[!] Connected device
    ! No devices available

! Doctor found issues in 2 categories.
Process finished with exit code 0

issue 问题是
He puzzled me for a whole day. Why did he say he couldn't find main.dart? It's right there
他困惑我一天了,为什么说一直找不到 main.dart 呢?它就在那儿

@BondarenkoStas
Copy link

@HeVTion Do you have main.dart exactly inside /lib folder?

@BondarenkoStas BondarenkoStas added the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Sep 21, 2019
@iapicca
Copy link
Contributor

iapicca commented Nov 11, 2019

Without additional information, we are unfortunately not sure how to resolve this issue.
We are therefore reluctantly going to close this bug for now.
Please don't hesitate to comment on the bug if you have any more information for us; we will reopen it right away!

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 its always better to open new issues and reference related issues.

@iapicca iapicca closed this as completed Nov 11, 2019
@CharlesXu1124
Copy link

this error still exists in 2021, so confusing...

@pedromassangocode pedromassangocode removed the waiting for customer response The Flutter team cannot make further progress on this issue until the original reporter responds label Mar 12, 2021
@github-actions
Copy link

github-actions bot commented Aug 4, 2021

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 4, 2021
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