在尝试将FloatingActionButton添加到我的布局时,AndroidStudio告诉我,我需要为此添加库设计:
"此操作需要库设计。 您想现在添加此库吗?"
我点击了#34;确定",现在构建完全失败。
到目前为止,我已经设法在文件" build.gradle"中找到了一行,我希望对此问题负责:
compile 'com.android.support:design:25.0.0'
我试图将其评论并重建,但错误仍然存在。
给出的错误是:
C:\AndroidProjects\ChartExample\app\src\main\res\layout\child_edit.xml
Error:(20, 39) No resource found that matches the given name (at 'layout_alignBaseline' with value '@id/etFirstName').
Error:(38, 39) No resource found that matches the given name (at 'layout_alignBaseline' with value '@id/etLastName').
Error:(54, 39) No resource found that matches the given name (at 'layout_alignBaseline' with value '@id/etBirthday').
Error:(73, 39) No resource found that matches the given name (at 'layout_alignBaseline' with value '@id/rbFemale').
C:\AndroidProjects\ChartExample\app\build\intermediates\res\merged\debug\layout\child_edit.xml
Error:(20, 39) No resource found that matches the given name (at 'layout_alignBaseline' with value '@id/etFirstName').
Error:(38, 39) No resource found that matches the given name (at 'layout_alignBaseline' with value '@id/etLastName').
Error:(54, 39) No resource found that matches the given name (at 'layout_alignBaseline' with value '@id/etBirthday').
Error:(73, 39) No resource found that matches the given name (at 'layout_alignBaseline' with value '@id/rbFemale').
Error:Execution failed for task ':app:processDebugResources'.
> com.android.ide.common.process.ProcessException: Failed to execute aapt
我猜这些错误主要是因为构建没有完成,而且还没有生成一些资源文件,但我不确定。
有人知道如何通过点击这个致命按钮撤消我对我的项目所做的事情吗? 感谢您提供任何帮助。
的Carsten
答案 0 :(得分:1)
原因是错误消息中提到的所有UI元素在布局xml中都有一个循环引用。该错误与添加的库无关。