无法将 * 解析为组件实现 [英] Could not resolve * to a component implementation

查看:28
本文介绍了无法将 * 解析为组件实现的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对此有点坚持,希望您能提供一些意见来帮助我.

I'm a wee bit stuck on this, and was hoping you might have some input to help me.

我收到无法将 * 解析为组件实现".错误信息.但是,我通过 Google 阅读的有关此内容的所有内容对我的案子都没有丝毫帮助.我想我只是遗漏了一些明显的东西,但也许是更严重的东西.

I'm getting the "Could not resolve * to a component implementation." error message. However, everything I've read about this via Google hasn't helped my case in the slightest. I presume I'm just missing something obvious, but maybe its something more serious.

所以,为了解决这个问题,我尝试了两件事,并且都奏效了,就他们带我而言.首先,我添加了一个完全相同种类的新组件,然后将出错组件的内容复制到其中.我用新组件替换了视图堆栈页面"(据我所知是相同的,但名称不同),编译器错误消失了.

So, to solve this problem, I've tried two things, and both work, as far as they take me. First, I added a new component, of the exact same variety, and then copied the contents of the erroring component into it. I replace the viewstack 'page' with the new component (which as near as I can tell is IDENTICAL, but with a different name), and the compiler error goes away.

我也可以通过简单地重命名原始组件来解决这个问题 &让 FB4 为我重构.错误再次消失.但是如果我再重命名回原来的名字,我会再次收到编译器错误.

I can also solve this by simply renaming the original component & letting FB4 refactor for me. The error goes away again. But if I then re-rename back to the original name, I get the compiler error again.

我多次尝试清理该项目,但没有帮助.删除工作区和重新导入项目也不会.

I've tried to clean the project several times, and that doesn't help. Neither does deleting the workspace, and re-importing the project.

我真的很想了解我在这里做错了什么.我错过了什么?

I'd really like to understand what I've done wrong here. What am I missing?

非常感谢!

推荐答案

通常像这样的错误意味着您有两个名称相似的组件,并且编译器无法判断您想使用哪一个.

Usually errors like this means you have two components named similarly and the compiler couldn't tell which one you wanted to use.

您是否有其他相同的组件,即使在不同的包中?或者您的组件中是否有与组件同名的变量?请务必检查您的 SWC 和/或库项目.

Do you have another component with the same, even in a different package? Or do you have a variable in your component the same name as the component? Be sure to check your SWCs and/or Library projects.

我假设这是一个编译时错误;那是对的吗?

I'm assuming this is a compile time error; is that correct?

这篇关于无法将 * 解析为组件实现的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆