desmos-labs / mooncake

The first decentralized social app based on Desmos
MIT License
46 stars 14 forks source link

flutter run errors #117

Closed wade-liwei closed 4 years ago

wade-liwei commented 4 years ago

Could you please help me fix the following errors. I have tested v0.4.1 and v0.4.0, I am a flutter beginner.

(base) adeMacBook-Pro:mooncake a$ flutter run Running "flutter pub get" in mooncake... 3.3s Using hardware rendering with device sdk gphone x86. If you get graphics artifacts, consider enabling software rendering with "--enable-software-rendering". Launching lib/main.dart on sdk gphone x86 in debug mode...

Compiler message: lib/ui/blocs/simple_bloc_delegate.dart:3:34: Error: Type 'BlocDelegate' not found. class SimpleBlocDelegate extends BlocDelegate {
^^^^^^^^^^^^
lib/main.dart:29:5: Error: Getter not found: 'BlocSupervisor'.
BlocSupervisor.delegate = SimpleBlocDelegate();
^^^^^^^^^^^^^^
lib/sources/dependency_injection.dart:41:21: Error: Too many positional arguments: 0 allowed, but 1 found. Try removing the extra positional arguments.
link: HttpLink(
^
../../../../../.pub-cache/hosted/pub.flutter-io.cn/graphql-3.1.0/lib/src/link/http/link_http.dart:21:3: Context: Found this candidate, but the arguments don't match. HttpLink({
^^^^^^^^
lib/sources/dependency_injection.dart:45:29: Error: Too many positional arguments: 0 allowed, but 1 found. Try removing the extra positional arguments.
).concat(WebSocketLink(
^
../../../../../.pub-cache/hosted/pub.flutter-io.cn/graphql-3.1.0/lib/src/link/web_socket/link_web_socket.dart:16:3 : Context: Found this candidate, but the arguments don't match. WebSocketLink({
^^^^^^^^^^^^^
lib/sources/dependency_injection.dart:50:14: Error: The method 'GraphQLCache' isn't defined for the class 'SourcesModule'.

RiccardoM commented 4 years ago

@wade-liwei Please make sure you satisfy the development requirements. Also, once you made sure that you have the proper Flutter version installed, you need to run the following commands:

flutter pub get 
flutter pub run build_runner build 

This should generate all the code properly

wade-liwei commented 4 years ago

I have try the cmd:

flutter upgrade flutter pub get flutter pub run build_runner build

and: flutter version 1.20.0 flutter pub get flutter pub run build_runner build

same errors happen:

(base) adeMacBook-Pro:mooncake a$ flutter pub run build_runner build Precompiling executable... Failed to precompile build_runner:build_runner: ../../../../../.pub-cache/hosted/pub.flutter-io.cn/build_resolvers-1.3.7/lib/src/resolver.dart:343:10: Error: Method not found: 'SummaryBuilder'. return SummaryBuilder(sdkSources, sdk.context) ^^^^^^^^^^^^^^ ../../../../../.pub-cache/hosted/pub.flutter-io.cn/build_resolvers-1.3.7/lib/src/resolver.dart:332:7: Error: The setter 'useSummary' isn't defined for the class 'FolderBasedDartSdk'.

can not run the cmd one by one: $ flutter version 1.20.0 $ flutter upgrade

I have to checkout stable branch after the cmd " flutter version 1.20.0"

wade-liwei commented 4 years ago

@RiccardoM these days too tired, Thank you help me.

RiccardoM commented 4 years ago

After talking on Discord, I'm closing this as it surely is a network problem and we can't reproduce it.