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 run the app #79

Closed
TanujChaniyari07 opened this issue Jun 12, 2020 · 21 comments
Closed

Unable to run the app #79

TanujChaniyari07 opened this issue Jun 12, 2020 · 21 comments

Comments

@TanujChaniyari07
Copy link

I am getting this error 66 - Could not find a file named "pubspec.yaml". Even when it is present. I am a beginner in flutter so could you please help me out.

@Alameen688
Copy link

Run cd app to navigate the app directory before running the flutter command you are trying to use.
It appears you are running the command in the root directory and the pubspec.yaml file is located at app/pubspec.yaml and not at the root.

@TanujChaniyari07
Copy link
Author

Run cd app to navigate the app directory before running the flutter command you are trying to use.
It appears you are running the command in the root directory and the pubspec.yaml file is located at app/pubspec.yaml and not at the root.

Screenshot (27)

This what I get when I open the folder and click on get packages

@Alameen688
Copy link

Alameen688 commented Jun 12, 2020

The Nima-Flutter project is on another repo https://github.com/2d-inc/Nima-Flutter and is added as a submodule to this project.
I believe that the Nima-Flutter directory you have is currently empty (please confirm). You need to run the following command to get it on your machine

git submodule init
git submodule update

The Usage section of the README.md file includes the above command https://github.com/2d-inc/HistoryOfEverything#usage

You can take a look at the instructions there if you've not seen it already.

@TanujChaniyari07
Copy link
Author

The Nima-Flutter project is on another repo https://github.com/2d-inc/Nima-Flutter and is added as a submodule to this project.
I believe that the Nima-Flutter directory you have is currently empty (please confirm). You need to run the following command to get it on your machine

git submodule init
git submodule update

The Usage section of the README.md file includes the above command https://github.com/2d-inc/HistoryOfEverything#usage

You can take a look at the instructions there if you've not seen it already.

Yeah nima-flutter dir was empty , I followed what you told but the get packages thing still running(it already has taken more than 20 mins)

@TanujChaniyari07
Copy link
Author

The Nima-Flutter project is on another repo https://github.com/2d-inc/Nima-Flutter and is added as a submodule to this project.
I believe that the Nima-Flutter directory you have is currently empty (please confirm). You need to run the following command to get it on your machine

git submodule init
git submodule update

The Usage section of the README.md file includes the above command https://github.com/2d-inc/HistoryOfEverything#usage

You can take a look at the instructions there if you've not seen it already.

So basically it is taking hell lot of time to update packages , so I feel I doing something wrong could you please help

@Alameen688
Copy link

Sorry about that. I don't have insight into why it might be taking long. I would do a fresh clone of this repo and try to set it up to see if I might run into the same issue.

@TanujChaniyari07
Copy link
Author

Sorry about that. I don't have insight into why it might be taking long. I would do a fresh clone of this repo and try to set it up to see if I might run into the same issue.

So when did a fresh clone this what I am getting
image

@Alameen688
Copy link

Alameen688 commented Jun 14, 2020

Delete the .packages file. Then run the pub get command again, flutter will generate a new one with the correct/up-to-date path.

@TanujChaniyari07
Copy link
Author

Delete the .packages file. Then run the pub get command again, flutter will generate a new one with the correct/up-to-date path.

Warning! This package referenced a Flutter repository via the .packages file that is no longer available. The repository from which the 'flutter' tool is currently executing will be used instead.
running Flutter tool: C:\Users\Tanuj Chaniyari\flutter
previous reference : C:\Flutter\HistoryOfEverything\dependencies\Nima-Flutter\Users\luigirosso\Projects\flutter
This can happen if you deleted or moved your copy of the Flutter repository, or if it was on a volume that is no longer mounted or has been mounted at a different location. Please check your system path to verify that you are running the expected version (run 'flutter --version' to see which flutter is on your path).

Running "flutter pub get" in Nima-Flutter... 4.3s
C:\Flutter\HistoryOfEverything\dependencies\Nima-Flutter\example: no pubspec.yaml found
exit code 1

The screenshot that I sent before contains this error

@TanujChaniyari07
Copy link
Author

I deleted .packages file and ran the command but still, I am getting some errors Please help

image

@Alameen688
Copy link

Alameen688 commented Jun 14, 2020

I see you are running the flutter pub get command in the root directory. cd app to navigate to app directory then flutter pub get to get packages.

@TanujChaniyari07
Copy link
Author

I see you are running the flutter pub get command in the root directory. cd app to navigate to app directory then flutter pub get to get packages.

Did that but still all files show errors

@Alameen688
Copy link

Alameen688 commented Jun 14, 2020

Did the command run successfully? And what do you mean by "all files show errors"?
Do you mean the red underline in VS code when referenced packages are not installed? If pub get command is still running, you might need to wait for it to complete before those lines diappear.

@TanujChaniyari07
Copy link
Author

Did the command run successfully? And what do you mean by "all files show errors"?
Do you mean the red underline in VS code when referenced packages are not installed? If pub get command is still running, you might need to wait for it to be complete before those lines diappear.

Yeah it did run successfully here's a screenshot
image

@Alameen688
Copy link

I see it installed some packages and didn't install some. For example, the timeline package.
Go ahead and delete the both .packages pubspec.lock lock file and do the package get again

@TanujChaniyari07
Copy link
Author

I see it installed some packages and didn't install some. For example, the timeline package.
Go ahead and delete the both .packages pubspec.lock lock file and do the package get again

Did that but...
image

@Alameen688
Copy link

It seems it was successful. The timeline import is no longer underlined in red.
You can restart VS Code so that it will reflect for all the other files.

@TanujChaniyari07
Copy link
Author

It seems it was successful. The timeline import is no longer underlined in red.
You can restart VS Code so that it will reflect for all the other files.

Okay now there is AndroidX issues this what I got when ran flutter run

Launching lib\main.dart on Redmi K20 Pro in debug mode...
[!] Your app isn't using AndroidX.
To avoid potential build failures, you can quickly migrate your app by following the steps on https://goo.gl/CP92wY.
Running Gradle task 'assembleDebug'...
Checking the license for package Android SDK Build-Tools 27.0.3 in C:\Users\Tanuj Chaniyari\AppData\Local\Android\sdk\licenses
License for package Android SDK Build-Tools 27.0.3 accepted.
Preparing "Install Android SDK Build-Tools 27.0.3 (revision: 27.0.3)".
"Install Android SDK Build-Tools 27.0.3 (revision: 27.0.3)" ready.
Installing Android SDK Build-Tools 27.0.3 in C:\Users\Tanuj Chaniyari\AppData\Local\Android\sdk\build-tools\27.0.3
"Install Android SDK Build-Tools 27.0.3 (revision: 27.0.3)" complete.
"Install Android SDK Build-Tools 27.0.3 (revision: 27.0.3)" finished.
Checking the license for package Android SDK Platform 27 in C:\Users\Tanuj Chaniyari\AppData\Local\Android\sdk\licenses
License for package Android SDK Platform 27 accepted.
Preparing "Install Android SDK Platform 27 (revision: 3)".
"Install Android SDK Platform 27 (revision: 3)" ready.
Installing Android SDK Platform 27 in C:\Users\Tanuj Chaniyari\AppData\Local\Android\sdk\platforms\android-27
"Install Android SDK Platform 27 (revision: 3)" complete.
"Install Android SDK Platform 27 (revision: 3)" finished.
C:\Users\Tanuj Chaniyari.gradle\caches\transforms-1\files-1.1\core-1.1.0.aar\54df8f7ba56822a78dd928091c924b0d\res\values\values.xml:7:5-70: AAPT: error: resource android:attr/fontVariationSettings not found.

C:\Users\Tanuj Chaniyari.gradle\caches\transforms-1\files-1.1\core-1.1.0.aar\54df8f7ba56822a78dd928091c924b0d\res\values\values.xml:7:5-70: AAPT: error: resource android:attr/ttcIndex not found.

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':app:processDebugResources'.

Failed to process resources, see aapt output above for details.

BUILD FAILED in 7m 26s
Running Gradle task 'assembleDebug'...
Running Gradle task 'assembleDebug'... Done 457.8s (!)
AndroidX incompatibilities may have caused this build to fail. Please migrate your app to AndroidX. See https://goo.gl/CP92wY.
Exception: Gradle task assembleDebug failed with exit code 1

@Alameen688
Copy link

I believe the original issue opened has been solved. We might not be able to continue this here.
https://flutter.dev/docs/development/androidx-migration
https://medium.com/flutter-community/solving-androidx-error-in-flutter-89bdc45885a6
https://medium.com/@carlosAmillan/fixing-androidx-error-in-flutter-f35e18d5925
Take a look at the resources above on fixing AndroidX migration issues.

@TanujChaniyari07
Copy link
Author

I believe the original issue opened has been solved. We might not be able to continue this here.
https://flutter.dev/docs/development/androidx-migration
https://medium.com/flutter-community/solving-androidx-error-in-flutter-89bdc45885a6
https://medium.com/@carlosAmillan/fixing-androidx-error-in-flutter-f35e18d5925
Take a look at the resources above on fixing AndroidX migration issues.

Thank you so much for all the help

@Alameen688
Copy link

You are welcome @TanujChaniyari07 🎉 ! Kindly "close" this issue.

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