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

无法运行,是有什么特殊配置吗 #6

Open
llllonger opened this issue Apr 28, 2022 · 4 comments
Open

无法运行,是有什么特殊配置吗 #6

llllonger opened this issue Apr 28, 2022 · 4 comments

Comments

@llllonger
Copy link

麻烦问一下,运行的时候跑不起来,有什么特殊的配置吗?

--W- The variant: debug, There's no json file
--W- The variant: release, There's no json file
--W- The variant: profile, There's no json file

@chn-sunch
Copy link
Owner

没有特殊配置。

@dashu3344
Copy link

70:7: Error: No named parameter with the name 'context'. context: context, ^^^^^^^ /C:/flutter_windows_2.10.3-stable/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_screenutil-5.5.1/lib/src/screen_util.dart:88:15: Context: Found this candidate, but the arguments don't match. static void init( ^^^^ lib/util/animationpage_util.dart:366:18: Error: Superclass has no method named 'buildMyTransitions'. return super.buildMyTransitions(context, animation, secondaryAnimation, page); ^^^^^^^^^^^^^^^^^^ Unhandled exception: NoSuchMethodError: The getter 'name' was called on null. Receiver: null Tried calling: name #0 Object.noSuchMethod (dart:core-patch/object_patch.dart:38:5) #1 ProgramCompiler._emitSuperTarget (package:dev_compiler/src/kernel/compiler.dart:5373:41) #2 ProgramCompiler.visitSuperMethodInvocation (package:dev_compiler/src/kernel/compiler.dart:5366:24) #3 SuperMethodInvocation.accept (package:kernel/ast.dart:6215:44) #4 ProgramCompiler._visitExpression (package:dev_compiler/src/kernel/compiler.dart:3870:20) #5 ProgramCompiler.visitAsExpression (package:dev_compiler/src/kernel/compiler.dart:5997:18) #6 AsExpression.accept (package:kernel/ast.dart:7414:44) #7 ProgramCompiler._visitExpression (package:dev_compiler/src/kernel/compiler.dart:3870:20) #8 ProgramCompiler.visitReturnStatement (package:dev_compiler/src/kernel/compiler.dart:4401:38) #9 ReturnStatement.accept (package:kernel/ast.dart:9877:43) #10 ProgramCompiler._visitStatement (package:dev_compiler/src/kernel/compiler.dart:3776:20) #11 MappedListIterable.elementAt (dart:_internal/iterable.dart:413:31) #12 ListIterator.moveNext (dart:_internal/iterable.dart:342:26) #13 new _GrowableList._ofEfficientLengthIterable (dart:core-patch/growable_array.dart:206:27) #14 new _GrowableList.of (dart:core-patch/growable_array.dart:153:28) #15 new List.of (dart:core-patch/array_patch.dart:51:28) #16 ListIterable.toList (dart:_internal/iterable.dart:213:44) #17 ProgramCompiler.visitBlock (package:dev_compiler/src/kernel/compiler.dart:3964:62) #18 Block.accept (package:kernel/ast.dart:8898:43) #19 ProgramCompiler._visitStatement (package:dev_compiler/src/kernel/compiler.dart:3776:20) #20 ProgramCompiler._emitFunctionScopedBody (package:dev_compiler/src/kernel/compiler.dart:3809:18) #21 ProgramCompiler._emitSyncFunctionBody.<anonymous closure> (package:dev_compiler/src/kernel/compiler.dart:3578:17) #22 ProgramCompiler._withLetScope (package:dev_compiler/src/kernel/compiler.dart:2376:25) #23 ProgramCompiler._withCurrentFunction (package:dev_compiler/src/kernel/compiler.dart:3612:18) #24 ProgramCompiler._emitSyncFunctionBody (package:dev_compiler/src/kernel/compiler.dart:3574:17) #25 ProgramCompiler._emitFunction (package:dev_compiler/src/kernel/compiler.dart:3391:11) #26 ProgramCompiler._emitMethodDeclaration (package:dev_compiler/src/kernel/compiler.dart:1970:12) #27 ProgramCompiler._emitClassMethods (package:dev_compiler/src/kernel/compiler.dart:1911:23) #28 ProgramCompiler._emitClassDeclaration (package:dev_compiler/src/kernel/compiler.dart:700:21) #29 ProgramCompiler._emitClass (package:dev_compiler/src/kernel/compiler.dart:622:21) #30 List.forEach (dart:core-patch/growable_array.dart:433:8) #31 ProgramCompiler._emitLibrary (package:dev_compiler/src/kernel/compiler.dart:571:23) #32 List.forEach (dart:core-patch/growable_array.dart) #33 ProgramCompiler.emitModule (package:dev_compiler/src/kernel/compiler.dart:431:15) #34 JavaScriptBundler.compile (package:frontend_server/src/javascript_bundle.dart:152:33) <asynchronous suspension> #35 FrontendCompiler.writeJavascriptBundle (package:frontend_server/frontend_server.dart:665:32) <asynchronous suspension> #36 FrontendCompiler.compile (package:frontend_server/frontend_server.dart:573:9) <asynchronous suspension> #37 listenAndCompile.<anonymous closure> (package:frontend_server/frontend_server.dart:1154:11) <asynchronous suspension> Finished with error: the Dart compiler exited unexpectedly. Failed to compile application.
这个是什么错误啊

@chn-sunch
Copy link
Owner

buildMyTransitions 是自定义的方法,代码里都有注释。你搜索这个出错的函数就能找到

//修改flutter的源文件,flutter版本更新后需要添加代码
// E:\flutter\packages\flutter\lib\src\cupertino\route.dart
// 1.搜索
// @OverRide
// Widget buildTransitions(BuildContext context, Animation animation, Animation secondaryAnimation, Widget child) {
// return buildPageTransitions(this, context, animation, secondaryAnimation, child);
// }
// 在上面的代码下添加以下的代码
// @OverRide
// Widget buildMyTransitions(BuildContext context, Animation animation, Animation secondaryAnimation, Widget child) {
// return buildMyPageTransitions(this, context, animation, secondaryAnimation, child);
// }

//创建一个自定义的ios动画,没有任何特效直接切换页面
// static Widget buildMyPageTransitions(
// PageRoute route,
// BuildContext context,
// Animation animation,
// Animation secondaryAnimation,
// Widget child,
// ) {
// return _CupertinoBackGestureDetector(
// enabledCallback: () => _isPopGestureEnabled(route),
// onStartPopGesture: () => _startPopGesture(route),
// child: child,
//
// );

@GarthGit
Copy link

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

4 participants