帖子
帖子
用户
博客
课程
12下一页
返回列表 发新帖
显示全部楼层
3
帖子
0
勋章
16
Y币

[插件开发] 已按照andoridX 模块说明开发, 但是无法使用

[复制链接]
发表于 2021-11-5 15:10:37
2021-11-05 03:03:05FAILURE: Build failed with an exception.* What went wrong:Execution failed for task ':app:processReleaseResources'.> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade   > Android resource linking failed     /uzmap/.gradle/caches/transforms-2/files-2.1/852afb0ec67077c082aff8ae7c0162f1/jetified-rtcKit-release/res/layout/calling_choose_dialog.xml:9: AAPT: error: attribute layout_constraintLeft_toLeftOf (aka com.A6032653729534:layout_constraintLeft_toLeftOf) not found.              /uzmap/.gradle/caches/transforms-2/files-2.1/852afb0ec67077c082aff8ae7c0162f1/jetified-rtcKit-release/res/layout/calling_choose_dialog.xml:9: AAPT: error: attribute layout_constraintTop_toTopOf (aka com.A6032653729534:layout_constraintTop_toTopOf) not found.              /uzmap/.gradle/caches/transforms-2/files-2.1/852afb0ec67077c082aff8ae7c0162f1/jetified-rtcKit-release/res/layout/calling_choose_dialog.xml:23: AAPT: error: attribute layout_constraintLeft_toLeftOf (aka com.A6032653729534:layout_constraintLeft_toLeftOf) not found.              /uzmap/.gradle/caches/transforms-2/files-2.1/852afb0ec67077c082aff8ae7c0162f1/jetified-rtcKit-release/res/layout/calling_choose_dialog.xml:23: AAPT: error: attribute layout_constraintTop_toBottomOf (aka com.A6032653729534:layout_constraintTop_toBottomOf) not found.              /uzmap/.gradle/caches/transforms-2/files-2.1/852afb0ec67077c082aff8ae7c0162f1/jetified-rtcKit-release/res/layout/calling_choose_dialog.xml:32: AAPT: error: attribute layout_constraintLeft_toLeftOf (aka com.A6032653729534:layout_constraintLeft_toLeftOf) not found.              /uzmap/.gradle/caches/transforms-2/files-2.1/852afb0ec67077c082aff8ae7c0162f1/jetified-rtcKit-release/res/layout/calling_choose_dialog.xml:32: AAPT: error: attribute layout_constraintTop_toBottomOf (aka com.A6032653729534:layout_constraintTop_toBottomOf) not found.              /uzmap/.gradle/caches/transforms-2/files-2.1/852afb0ec67077c082aff8ae7c0162f1/jetified-rtcKit-release/res/layout/calling_choose_dialog.xml:46: AAPT: error: attribute layout_constraintLeft_toLeftOf (aka com.A6032653729534:layout_constraintLeft_toLeftOf) not found.              /uzmap/.gradle/caches/transforms-2/files-2.1/852afb0ec67077c082aff8ae7c0162f1/jetified-rtcKit-release/res/layout/calling_choose_dialog.xml:46: AAPT: error: attribute layout_constraintTop_toBottomOf (aka com.A6032653729534:layout_constraintTop_toBottomOf) not found.              /uzmap/.gradle/caches/transforms-2/files-2.1/852afb0ec67077c082aff8ae7c0162f1/jetified-rtcKit-release/res/layout/calling_choose_dialog.xml:55: AAPT: error: attribute layout_constraintLeft_toLeftOf (aka com.A6032653729534:layout_constraintLeft_toLeftOf) not found.              /uzmap/.gradle/caches/transforms-2/files-2.1/852afb0ec67077c082aff8ae7c0162f1/jetified-rtcKit-release/res/layout/calling_choose_dialog.xml:55: AAPT: error: attribute layout_constraintTop_toBottomOf (aka com.A6032653729534:layout_constraintTop_toBottomOf) not found.              /uzmap/.gradle/caches/transforms-2/files-2.1/852afb0ec67077c082aff8ae7c0162f1/jetified-rtcKit-release/res/layout/fragment_first.xml:9: AAPT: error: attribute layout_constraintBottom_toBottomOf (aka com.A6032653729534:layout_constraintBottom_toBottomOf) not found.              /uzmap/.gradle/caches/transforms-2/files-2.1/852afb0ec67077c082aff8ae7c0162f1/jetified-rtcKit-release/res/layout/fragment_first.xml:9: AAPT: error: attribute layout_constraintEnd_toEndOf (aka com.A6032653729534:layout_constraintEnd_toEndOf) not found.              /uzmap/.gradle/caches/transforms-2/files-2.1/852afb0ec67077c082aff8ae7c0162f1/jetified-rtcKit-release/res/layout/fragment_first.xml:9: AAPT: error: attribute layout_constraintStart_toStartOf (aka com.A6032653729534:layout_constraintStart_toStartOf) not found.              /uzmap/.gradle/caches/transforms-2/files-2.1/852afb0ec67077c082aff8ae7c0162f1/jetified-rtcKit-release/res/layout/fragment_first.xml:9: AAPT: error: attribute layout_constraintTop_toBottomOf (aka com.A6032653729534:layout_constraintTop_toBottomOf) not found.              /uzmap/.gradle/caches/transforms-2/files-2.1/852afb0ec67077c082aff8ae7c0162f1/jetified-rtcKit-release/res/layout/fragment_first.xml:19: AAPT: error: attribute layout_constraintBottom_toTopOf (aka com.A6032653729534:layout_constraintBottom_toTopOf) not found.              /uzmap/.gradle/caches/transforms-2/files-2.1/852afb0ec67077c082aff8ae7c0162f1/jetified-rtcKit-release/res/layout/fragment_first.xml:19: AAPT: error: attribute layout_constraintEnd_toEndOf (aka com.A6032653729534:layout_constraintEnd_toEndOf) not found.              /uzmap/.gradle/caches/transforms-2/files-2.1/852afb0ec67077c082aff8ae7c0162f1/jetified-rtcKit-release/res/layout/fragment_first.xml:19: AAPT: error: attribute layout_constraintStart_toStartOf (aka com.A6032653729534:layout_constraintStart_toStartOf) not found.              /uzmap/.gradle/caches/transforms-2/files-2.1/852afb0ec67077c082aff8ae7c0162f1/jetified-rtcKit-release/res/layout/fragment_first.xml:19: AAPT: error: attribute layout_constraintTop_toTopOf (aka com.A6032653729534:layout_constraintTop_toTopOf) not found.              /uzmap/.gradle/caches/transforms-2/files-2.1/852afb0ec67077c082aff8ae7c0162f1/jetified-rtcKit-release/res/layout/fragment_second.xml:9: AAPT: error: attribute layout_constraintBottom_toBottomOf (aka com.A6032653729534:layout_constraintBottom_toBottomOf) not found.              /uzmap/.gradle/caches/transforms-2/files-2.1/852afb0ec67077c082aff8ae7c0162f1/jetified-rtcKit-release/res/layout/fragment_second.xml:9: AAPT: error: attribute layout_constraintEnd_toEndOf (aka com.A6032653729534:layout_constraintEnd_toEndOf) not found.         * Try:Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.* Get more help at https://help**.**BUILD FAILED in 17s

130
帖子
7
勋章
5万+
Y币
appcompat-1.2.0.aar
appcompat-resources-1.2.0.aar

这两个aar 包放在模块包里面试试
3
帖子
0
勋章
16
Y币
已经配置了 <meta-data android:name="android.useAndroidX" android:value="true" />,  
而且 build.gradle里 也做了 api "androidx.constraintlayout:constraintlayout:1.1.3" 依赖

gradle.properties 里 配置了 android.useAndroidX=true
android.enableJetifier=true
130
帖子
7
勋章
5万+
Y币
潘浩波 发表于 2021-11-5 15:13
已经配置了 ,  
而且 build.gradle里 也做了 api "androidx.constraintlayout:constraintlayout:1.1.3" 依 ...

相关的模块aar 包放到模块包里面
3
帖子
0
勋章
16
Y币
520707liu 发表于 2021-11-5 15:16
相关的模块aar 包放到模块包里面

将 那两个 appcompat包 放在 模块包里 还是报一样的错
a22.png
130
帖子
7
勋章
5万+
Y币
潘浩波 发表于 2021-11-5 15:56
将 那两个 appcompat包 放在 模块包里 还是报一样的错

把上边你说的几个设置的地方,都截图看一下
3
帖子
0
勋章
16
Y币
520707liu 发表于 2021-11-5 16:33
把上边你说的几个设置的地方,都截图看一下

就这三个地方
c11.png
c12.png
c13.png
3
帖子
0
勋章
16
Y币
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas**.**/apk/res/android"
    xmlns:app="http://schemas**.**/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/color_white">


    <androidx.constraintlayout.widget.ConstraintLayout
        android:id="@+id/cl_edit"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginLeft="20dp"
        android:layout_marginRight="20dp"
        android:layout_marginBottom="30dp"
        android:background="@drawable/bg_edit_text"
        android:padding="16dp"
        app:layout_constraintBottom_toTopOf="@id/tv_login"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toRightOf="parent">

        <TextView
            android:id="@+id/tv_phone_number"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/user_id"
            android:textColor="@color/color_black"
            android:textSize="16sp"
            app:layout_constraintLeft_toLeftOf="@id/cl_edit"
            app:layout_constraintTop_toTopOf="@id/cl_edit" />

这是报错的 layout 文件
130
帖子
7
勋章
5万+
Y币
潘浩波 发表于 2021-11-5 16:50
这是报错的 layout 文件

https://developer.yonyou.com/thread-191332-1-1.html


下载一下commonResource 这个自定模块添加进去试试,看看报什么错误
3
帖子
0
勋章
16
Y币
520707liu 发表于 2021-11-5 17:10
https://developer.yonyou.com/thread-191332-1-1.html

没有报错
12下一页
您需要登录后才可以回帖 登录

本版积分规则