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
执行 flutter pub run build_runner build 报错 #14
Comments
贴一下doctor信息 |
错误原因是无法创建编译中间产物,没有权限。 把更多的runner编译日志发一下,看看是哪一步权限问题 |
@SionChen 恭喜你进入接入流程了
该问题一般是由于build函数中出现了不支持的语法格式;导致进行代码格式化时出现异常。
指的是原生运行ok对吧?原生ok的情况下,根据错误日志提示,定位出语法问题,进行组件封装或者引用替换即可。具体示例可以参考example,里面有多重业务场景的替换方法(不唯一)。如果不介意,也可把这个widget的代码贴出来,帮你分析下。 |
|
这个log也没有看出来是哪个语法出了问题 |
这段代码包含逻辑运算,所以报错。目前编译器没有输出更多错误信息,会补充日志,方便开发是排查转义问题 |
好的 目前支持Function的转义吗?@Fairwell修饰? |
调整后的参考代码见附件: |
data绑定参数,只能使用基础类型,不能使用数组,对象也不建议 {
"className": "Column",
"na": {
"children": [
{
"className": "Column",
"na": {
"children": [
{
"className": "SizedBox",
"na": {
"height": 5
}
},
{
"className": "Row",
"na": {
"children": [
{
"className": "Expanded",
"na": {
"child": {
"className": "TabBar",
"na": {
"controller": "#(tabController)",
"tabs": {
"className": "Sugar.mapEach",
"pa": [
"#(tabs)",
{
"className": "Container",
"na": {
"height": 30,
"child": {
"className": "Padding",
"na": {
"padding": {
"className": "EdgeInsets.only",
"na": {
"top": 5
}
},
"child": {
"className": "Text",
"pa": [
"item"
],
"na": {
"style": {
"className": "TextStyle",
"na": {
"color": "#(Colors.black)"
}
}
}
}
}
}
}
}
]
},
"labelColor": "#(Colors.black)"
}
}
}
},
{
"className": "GestureDetector",
"na": {
"onTap": "#(onTap)",
"child": {
"className": "Row",
"na": {
"children": [
{
"className": "SizedBox",
"na": {
"width": 10
}
},
{
"className": "Text",
"pa": [
"筛选"
],
"na": {
"style": {
"className": "TextStyle",
"na": {
"color": "#(Colors.red)"
}
}
}
},
{
"className": "Icon",
"pa": [
"#(Icons.favorite_rounded)"
],
"na": {
"color": "#(Colors.grey)"
}
},
{
"className": "SizedBox",
"na": {
"width": 10
}
}
]
}
}
}
}
]
}
},
{
"className": "Row",
"na": {
"children": [
{
"className": "Expanded",
"na": {
"child": {
"className": "Row",
"na": {
"mainAxisAlignment": "#(MainAxisAlignment.spaceAround)",
"children": [
{
"className": "Text",
"pa": [
"猜你喜欢"
]
},
{
"className": "Text",
"pa": [
"高佣必买"
]
},
{
"className": "Text",
"pa": [
"30天热销"
]
},
{
"className": "Text",
"pa": [
"卡片显示"
]
}
]
}
}
}
},
{
"className": "SizedBox",
"na": {
"width": 5
}
},
{
"className": "Row",
"na": {
"children": [
{
"className": "Text",
"pa": [
"快速选货"
],
"na": {
"style": {
"className": "TextStyle",
"na": {
"color": "#(Colors.black)"
}
}
}
},
{
"className": "SizedBox",
"na": {
"width": 10
}
}
]
}
}
]
}
},
{
"className": "SizedBox",
"na": {
"height": 10
}
}
]
}
},
{
"className": "Column",
"na": {
"children": [
{
"className": "ListItemView"
},
{
"className": "Container",
"na": {
"color": "#(myColor)"
}
}
]
}
}
]
}
} |
大佬 有没有交流群? 可以加一下吗 |
demo中是一个数组string对象。字符串是基础类型。不能使用对象的原因是没有反射api,所以很困难支持对象。讨论组,有微信群,后面看看搞一个chat通道 |
到首页去gitter讨论组聊 |
The text was updated successfully, but these errors were encountered: