Code Monkey home page Code Monkey logo

Comments (7)

TshineZheng avatar TshineZheng commented on May 10, 2024 2

same here

from auto_route_library.

JRamos29 avatar JRamos29 commented on May 10, 2024 1

I tried to run the example and got the same error, that was solved with:

flutter clean
flutter pub upgrade
flutter pub get

But then during the build it couldn't find the target on ios build, due the project configuration, that has different environments. The solution was create a new flutter project and copy the content from the example's lib folder to the lib of the new project, and the dependencies of pubspec.yaml as well. Now it's working.

from auto_route_library.

Milad-Akarie avatar Milad-Akarie commented on May 10, 2024

Hey, @jerryzhoujw can you please show me your pubspec file?

from auto_route_library.

jerryzhoujw avatar jerryzhoujw commented on May 10, 2024

hi @Milad-Akarie , I just run it in your example/ folder.

from auto_route_library.

vasilich6107 avatar vasilich6107 commented on May 10, 2024

This is true the example is not working.
For the first time I have the same error as @jerryzhoujw
When I update pubspeck to use versions instead of path it throws

Failed to precompile build_runner:build_runner:r pub run build_runner build                             
../../../.pub-cache/hosted/pub.dartlang.org/http_multi_server-2.1.0/lib/src/multi_headers.dart:97:8: Error: The method 'MultiHeaders.add' has fewer named arguments than those of overridden method 'HttpHeaders.add'.
  void add(String name, Object value) {
       ^
org-dartlang-sdk:///sdk/lib/_http/http.dart:694:8: Context: This is the overridden method ('add').
  void add(String name, Object value,
       ^
../../../.pub-cache/hosted/pub.dartlang.org/http_multi_server-2.1.0/lib/src/multi_headers.dart:129:8: Error: The method 'MultiHeaders.set' has fewer named arguments than those of overridden method 'HttpHeaders.set'.
  void set(String name, Object value) {
       ^
org-dartlang-sdk:///sdk/lib/_http/http.dart:703:8: Context: This is the overridden method ('set').
  void set(String name, Object value,
       ^
pub finished with exit code 1

from auto_route_library.

raymondctc avatar raymondctc commented on May 10, 2024

Not sure why, but this works for for me, using dependency_overrides to specify the path:

diff --git a/example/pubspec.yaml b/example/pubspec.yaml
index c0ac5c0..d706630 100644
--- a/example/pubspec.yaml
+++ b/example/pubspec.yaml
@@ -8,8 +8,8 @@ environment:
 dependencies:
   flutter:
     sdk: flutter
-  auto_route:
-    path: ../auto_route
+    #auto_route:
+    #path: ./auto_route/

 dev_dependencies:
   build_runner:
@@ -17,11 +17,19 @@ dev_dependencies:
   flutter_test:
     sdk: flutter
   auto_route_generator:
-    path: ../auto_route_generator
+    path: ../auto_route_generator/
   effective_dart: ^1.2.0
   hive_generator: ^0.8.1
   pedantic:

+dependency_overrides:
+  auto_route:
+    path: ../auto_route/
+
+
 flutter:
   uses-material-design: true

from auto_route_library.

theweiweiway avatar theweiweiway commented on May 10, 2024

Closing due to:

  • stale issue
  • seems to be a solution

from auto_route_library.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.