2 错误会影响应用在 flutter 中的发布吗?
2 Errors affect app publishing in flutter?
尽管 App 在模拟器上运行良好,但我还是收到了 2 个错误。在 google Play 商店和 ios App 商店发布时,这些错误会导致问题吗?
第一个:
warning: The include file 'package:flutter_lints/flutter.yaml' in 'C:\Users\codingaccount\Desktop\myApp\analysis_options.yaml' can't be found when analyzing 'C:\Users\codingaccount\Desktop\myApp'. (include_file_not_found at [myApp] analysis_options.yaml:10)
第二个:
Note: C:\flutter\.pub-cache\hosted\pub.dartlang.org\contacts_service-0.6.3\android\src\main\java\flutter\plugins\contactsservice\contactsservice\ContactsServicePlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
不,我不认为该警告会使您的应用程序崩溃。
对于第一个,我认为您错过了 analysis_options 文件中的规则。
我想我们应该知道为什么我们要面对这样的事情,
如果 analysis_options.yaml
包含
,flutter_lints 将不起作用
include: package:lints/recommended.yaml
linter:
rules:
- avoid_print
- avoid_unnecessary_containers
- avoid_web_libraries_in_flutter
- no_logic_in_create_state
- prefer_const_constructors
- prefer_const_constructors_in_immutables
- prefer_const_declarations
- prefer_const_literals_to_create_immutables
- sized_box_for_whitespace
- use_full_hex_values_for_flutter_colors
- use_key_in_widget_constructors
尽管 App 在模拟器上运行良好,但我还是收到了 2 个错误。在 google Play 商店和 ios App 商店发布时,这些错误会导致问题吗?
第一个:
warning: The include file 'package:flutter_lints/flutter.yaml' in 'C:\Users\codingaccount\Desktop\myApp\analysis_options.yaml' can't be found when analyzing 'C:\Users\codingaccount\Desktop\myApp'. (include_file_not_found at [myApp] analysis_options.yaml:10)
第二个:
Note: C:\flutter\.pub-cache\hosted\pub.dartlang.org\contacts_service-0.6.3\android\src\main\java\flutter\plugins\contactsservice\contactsservice\ContactsServicePlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
不,我不认为该警告会使您的应用程序崩溃。 对于第一个,我认为您错过了 analysis_options 文件中的规则。
我想我们应该知道为什么我们要面对这样的事情,
如果 analysis_options.yaml
包含
include: package:lints/recommended.yaml
linter:
rules:
- avoid_print
- avoid_unnecessary_containers
- avoid_web_libraries_in_flutter
- no_logic_in_create_state
- prefer_const_constructors
- prefer_const_constructors_in_immutables
- prefer_const_declarations
- prefer_const_literals_to_create_immutables
- sized_box_for_whitespace
- use_full_hex_values_for_flutter_colors
- use_key_in_widget_constructors