-
Notifications
You must be signed in to change notification settings - Fork 122
在release模式下,call library级别的方法,编译出错。 #12
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
Comments
@galaxybruce kylewong@KyleWongdeMacBook-Pro flutter % flutter doctor -v
KWLM:doctor -v
[✓] Flutter (Channel master, v1.9.8-pre.54, on Mac OS X 10.15 19A546d, locale en-CN)
• Flutter version 1.9.8-pre.54 at /Users/kylewong/Codes/Flutter/alibaba-flutter/flutter
• Framework revision 16fcb83fec (4 hours ago), 2019-09-02 23:44:41 -0400
• Engine revision e7f9ef6aa0
• Dart version 2.5.0 (build 2.5.0-dev.4.0 36985859e4) 下是没有问题的,debug/release(ios/android)都测了下。 void appInit() async{
}
void main() {
// appInit();
runApp(MyApp());
} import 'package:aspectd/aspectd.dart';
@Aspect()
@pragma("vm:entry-point")
class ExecuteDemo {
@pragma("vm:entry-point")
ExecuteDemo();
@Execute("package:example/main.dart", "_MyHomePageState", "-_incrementCounter")
@pragma("vm:entry-point")
void _incrementCounter(PointCut pointcut) {
pointcut.proceed();
print('[KWLM1] called!');
}
@Execute("package:example/main.dart", "", "+appInit")
@pragma("vm:entry-point")
void appInit(PointCut pointcut) {
pointcut.proceed();
print('[KWLM2] called!');
}
} |
我使用的的flutter版本是1.7.8 |
@galaxybruce |
This was referenced Nov 18, 2020
Closed
@galaxybruce 你好,我现在编译release也你这个类似的错,debug是正常的,请问你那都解决了吗? |
This was referenced Mar 9, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@kangwang1988

反复测试发现一个问题,我给一个library方法添加call aop,debug模式下能正常编译,而且运行结果也正确。release模式下,出现“Dart snapshot generator failed with exit code -6”错误,生成的app.dill文件,转为txt查看了下,也是正确的,但是最后在flutter/bin/flutter中出错。
以下是我的测试代码:
错误日志:

The text was updated successfully, but these errors were encountered: