Lint在组装发布目标时发现了致命错误

时间:2018-10-02 04:11:28

标签: java android-studio

我正在编译要发布的应用程序,但收到一条错误消息:     在组装释放目标时,Lint发现了致命错误。

<issue
    id="UnknownId"
    severity="Fatal"
    message="The id &quot;`_dynamic`&quot; is not defined anywhere."
    category="Correctness"
    priority="8"
    summary="Reference to an unknown id"
    explanation="The `@+id/` syntax refers to an existing id, or creates a new one if it has not already been defined elsewhere. However, this means that if you have a typo in your reference, or if the referred view no longer exists, you do not get a warning since the id will be created on demand. This check catches errors where you have renamed an id without updating all of the references to it."
    errorLine1="        app:layout_constraintBottom_toTopOf=&quot;@+id/_dynamic&quot;"
    errorLine2="        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~">
    <location
        file="C:\Users\Jackson\Desktop\SafetyNet\app\src\main\res\layout\activity_mock.xml"
        line="35"
        column="9"/>
</issue>

2 个答案:

答案 0 :(得分:13)

如果您仔细阅读logcat,则会发现更具体的错误。如果您在logcat中看不到任何内容,请转到

/build/reports/lint-results-release-fatal.xml

您将在此处找到日志。如果您仍然无法解决问题,请将其发布在您的问题中。

答案 1 :(得分:3)

如果您使用的是Macbook,请转到项目目录并打开构建文件夹
搜索:“ 棉绒结果释放致命 enter image description here

enter image description here 打开 lint-results-release-fatal.html

正确性上点击点击,它将确切显示错误内容 enter image description here

修复错误 然后尝试再次释放。



祝你好运,其他开发人员