Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/200.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/templates/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 无法生成已签名的APK?_Java_Android_Xml_Android Layout - Fatal编程技术网

Java 无法生成已签名的APK?

Java 无法生成已签名的APK?,java,android,xml,android-layout,Java,Android,Xml,Android Layout,我正在尝试生成签名的APK。但由于生成时的lint错误,无法生成。我检查了我的lint报告,它在我的XML文件中显示了错误 关于“NotSibling”类问题的解释: 给定ConstraintLayout或RelativeLayout中的布局约束应 参考同一相对布局中的其他视图(但不是其本身!) 1个错误,0个警告 失败:生成失败,出现异常 错误:任务“:app:lintVitalRelease”的执行失败 Lint在组装发布目标时发现了致命错误。 要继续,请修复lint识别的问题,或按如下方

我正在尝试生成签名的APK。但由于生成时的lint错误,无法生成。我检查了我的lint报告,它在我的XML文件中显示了错误

关于“NotSibling”类问题的解释: 给定ConstraintLayout或RelativeLayout中的布局约束应 参考同一相对布局中的其他视图(但不是其本身!)

1个错误,0个警告

失败:生成失败,出现异常

  • 错误:任务“:app:lintVitalRelease”的执行失败

    Lint在组装发布目标时发现了致命错误。 要继续,请修复lint识别的问题,或按如下方式修改构建脚本:。。。安卓{ 林特选项{ checkReleaseBuilds为false //或者,如果愿意,可以继续检查发布版本中的错误, //但即使发现错误,也要继续生成: 异常错误

以下是我的XML:

<RelativeLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:clickable="true"
    android:background="@color/background">

    <androidx.core.widget.NestedScrollView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_below="@+id/all_featured_deals_divider"
        android:orientation="vertical"
        android:overScrollMode="never">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="vertical"
        android:paddingTop="3dp"
        android:paddingRight="6dp"
        android:paddingLeft="6dp"
        android:paddingBottom="3dp">

    <androidx.recyclerview.widget.RecyclerView
        android:id="@+id/notificationsRecyclerView"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:nestedScrollingEnabled="false"/>

    </LinearLayout>

    </androidx.core.widget.NestedScrollView>

</RelativeLayout>
../../src/main/res/layout/notification_view.xml:48: @+id/all_featured_deals_divider不是同一个系统中的兄弟姐妹 相对论


错误是:给定ConstraintLayout或RelativeLayout中的布局约束应引用同一相对布局中的其他视图(但不是其本身!)

删除
android:Layout\u below=“@+id/all\u featured\u deals\u divider”


如果您正在重用xml,例如使用include,请执行此处的约束。

您的
@+id/all\u featured\u deals\u divider
不引用当前xml文件中的任何元素


您可能是从其他XML文件中复制了布局,该文件中存在具有此名称的元素,但此处未包含该元素。您可以删除该行,因为它没有任何用处,并且您的代码应该不会显示任何错误。

删除该行安卓:布局\u
    android:layout_below="@+id/all_featured_deals_divider"