user2338826
user2338826

Reputation: 183

Codemagic build process for a Flutter app: Could not find a file named "pubspec.yaml"

I am using Codemagic for the iOS build process for a Flutter app.

In the pubspec.yaml I am referring to a package dependency by pointing to a public repository like so:

dependencies:
  flutter:
    sdk: flutter
  flutter_circular_slider: 
    git: https://github.com/tomoehlrich/flutter-circular-slider.git

It all works with local debugging and when building an apk with "flutter build apk" on Windows.

Codemagic though keeps giving me the following error message in the build step "Installing dependencies":

== Install Flutter dependencies ==
> flutter packages pub get
Resolving dependencies...
Could not find a file named "pubspec.yaml" in https://github.com/tomoehlrich/flutter-circular-slider.git 5d6d0c54e93766b27d30707bf20042b26894561c.pub 

finished with exit code 1

Build failed :|Failed to install dependencies

I had Codemagic working before. The difference now to the working version was that I was referencing a different repository on Github.

I am trying to figure out why the build process cannot find the pubspec.yaml in https://github.com/tomoehlrich/flutter-circular-slider.git but in another fork of the same flutter package on Github.

Any hints are highly appreciated.

Upvotes: 1

Views: 714

Answers (1)

user2338826
user2338826

Reputation: 183

It seems that "resolved-ref" in pubspec.lock for the slider package was an outdated reference.

A new generation of pubspec.lock, sync to GitHub and start a new build process in Codemagic did the trick.

Upvotes: 0

Related Questions