Closed dary123 closed 5 years ago
可以贴一下详细的log嘛?
你项目中是不是使用了PhotoView这个库?
请测试一下这个版本的还有没有问题: v3: implementation 'com.github.SherlockGougou:BigImageViewPager:masterGlideV3-SNAPSHOT' v4: implementation 'com.github.SherlockGougou:BigImageViewPager:master-SNAPSHOT'
我之前是直接下载好源码,当做模块导入,没有使用gradle,刚刚使用gradle导入了下,还是会报错: AGPBI: {"kind":"error","text":"error: attribute \u0027com.xindonshisan.ThireteenFriend:contentScrim\u0027 not found.","sources":[{"file":"F:\dary\hicc\ThirTwo\ThirteenNewV\app\src\main\res\layout\activity_userhome.xml","position":{"startLine":13}}],"original":"","tool":"AAPT"} AGPBI: {"kind":"error","text":"error: attribute \u0027com.xindonshisan.ThireteenFriend:layout_scrollFlags\u0027 not found.","sources":[{"file":"F:\dary\hicc\ThirTwo\ThirteenNewV\app\src\main\res\layout\activity_userhome.xml","position":{"startLine":13}}],"original":"","tool":"AAPT"} AGPBI: {"kind":"error","text":"error: attribute \u0027com.xindonshisan.ThireteenFriend:statusBarScrim\u0027 not found.","sources":[{"file":"F:\dary\hicc\ThirTwo\ThirteenNewV\app\src\main\res\layout\activity_userhome.xml","position":{"startLine":13}}],"original":"","tool":"AAPT"} AGPBI: {"kind":"error","text":"error: attribute \u0027com.xindonshisan.ThireteenFriend:layout_collapseMode\u0027 not found.","sources":[{"file":"F:\dary\hicc\ThirTwo\ThirteenNewV\app\src\main\res\layout\activity_userhome.xml","position":{"startLine":182}}],"original":"","tool":"AAPT"} AGPBI: {"kind":"error","text":"error: resource string/appbar_scrolling_view_behavior (aka com.xindonshisan.ThireteenFriend:string/appbar_scrolling_view_behavior) not found.","sources":[{"file":"F:\dary\hicc\ThirTwo\ThirteenNewV\app\src\main\res\layout\activity_userhome.xml","position":{"startLine":236}}],"original":"","tool":"AAPT"} AGPBI: {"kind":"error","text":"error: attribute \u0027com.xindonshisan.ThireteenFriend:contentScrim\u0027 not found.","sources":[{"file":"F:\dary\hicc\ThirTwo\ThirteenNewV\app\src\main\res\layout\activity_userhomenew.xml","position":{"startLine":13}}],"original":"","tool":"AAPT"} AGPBI: {"kind":"error","text":"error: attribute \u0027com.xindonshisan.ThireteenFriend:layout_scrollFlags\u0027 not found.","sources":[{"file":"F:\dary\hicc\ThirTwo\ThirteenNewV\app\src\main\res\layout\activity_userhomenew.xml","position":{"startLine":13}}],"original":"","tool":"AAPT"} AGPBI: {"kind":"error","text":"error: attribute \u0027com.xindonshisan.ThireteenFriend:layout_collapseMode\u0027 not found.","sources":[{"file":"F:\dary\hicc\ThirTwo\ThirteenNewV\app\src\main\res\layout\activity_userhomenew.xml","position":{"startLine":172}}],"original":"","tool":"AAPT"} AGPBI: {"kind":"error","text":"error: resource string/appbar_scrolling_view_behavior (aka com.xindonshisan.ThireteenFriend:string/appbar_scrolling_view_behavior) not found.","sources":[{"file":"F:\dary\hicc\ThirTwo\ThirteenNewV\app\src\main\res\layout\activity_userhomenew.xml","position":{"startLine":228}}],"original":"","tool":"AAPT"} AGPBI: {"kind":"error","text":"error: attribute \u0027com.xindonshisan.ThireteenFriend:contentScrim\u0027 not found.","sources":[{"file":"F:\dary\hicc\ThirTwo\ThirteenNewV\app\src\main\res\layout\activity_view_skeleton.xml","position":{"startLine":13}}],"original":"","tool":"AAPT"} AGPBI: {"kind":"error","text":"error: attribute \u0027com.xindonshisan.ThireteenFriend:layout_scrollFlags\u0027 not found.","sources":[{"file":"F:\dary\hicc\ThirTwo\ThirteenNewV\app\src\main\res\layout\activity_view_skeleton.xml","position":{"startLine":13}}],"original":"","tool":"AAPT"} AGPBI: {"kind":"error","text":"error: attribute \u0027com.xindonshisan.ThireteenFriend:layout_collapseMode\u0027 not found.","sources":[{"file":"F:\dary\hicc\ThirTwo\ThirteenNewV\app\src\main\res\layout\activity_view_skeleton.xml","position":{"startLine":139}}],"original":"","tool":"AAPT"} AGPBI: {"kind":"error","text":"error: resource string/appbar_scrolling_view_behavior (aka com.xindonshisan.ThireteenFriend:string/appbar_scrolling_view_behavior) not found.","sources":[{"file":"F:\dary\hicc\ThirTwo\ThirteenNewV\app\src\main\res\layout\activity_view_skeleton.xml","position":{"startLine":195}}],"original":"","tool":"AAPT"} AGPBI: {"kind":"error","text":"error: attribute \u0027com.xindonshisan.ThireteenFriend:cardCornerRadius\u0027 not found.","sources":[{"file":"F:\dary\hicc\ThirTwo\ThirteenNewV\app\src\main\res\layout\item_all_date_record.xml","position":{"startLine":9}}],"original":"","tool":"AAPT"} AGPBI: {"kind":"error","text":"error: attribute \u0027com.xindonshisan.ThireteenFriend:cardElevation\u0027 not found.","sources":[{"file":"F:\dary\hicc\ThirTwo\ThirteenNewV\app\src\main\res\layout\item_all_date_record.xml","position":{"startLine":9}}],"original":"","tool":"AAPT"} AGPBI: {"kind":"error","text":"error: attribute \u0027com.xindonshisan.ThireteenFriend:cardCornerRadius\u0027 not found.","sources":[{"file":"F:\dary\hicc\ThirTwo\ThirteenNewV\app\src\main\res\layout\item_banner_img.xml","position":{"startLine":1}}],"original":"","tool":"AAPT"} AGPBI: {"kind":"error","text":"error: attribute \u0027com.xindonshisan.ThireteenFriend:cardElevation\u0027 not found.","sources":[{"file":"F:\dary\hicc\ThirTwo\ThirteenNewV\app\src\main\res\layout\item_banner_img.xml","position":{"startLine":1}}],"original":"","tool":"AAPT"} AGPBI: {"kind":"error","text":"error: attribute \u0027com.xindonshisan.ThireteenFriend:cardCornerRadius\u0027 not found.","sources":[{"file":"F:\dary\hicc\ThirTwo\ThirteenNewV\app\src\main\res\layout\item_date_record.xml","position":{"startLine":16}}],"original":"","tool":"AAPT"} AGPBI: {"kind":"error","text":"error: attribute \u0027com.xindonshisan.ThireteenFriend:cardElevation\u0027 not found.","sources":[{"file":"F:\dary\hicc\ThirTwo\ThirteenNewV\app\src\main\res\layout\item_date_record.xml","position":{"startLine":16}}],"original":"","tool":"AAPT"} AGPBI: {"kind":"error","text":"error: attribute \u0027com.xindonshisan.ThireteenFriend:cardCornerRadius\u0027 not found.","sources":[{"file":"F:\dary\hicc\ThirTwo\ThirteenNewV\app\src\main\res\layout\item_datewoman.xml","position":{"startLine":1}}],"original":"","tool":"AAPT"} :app:processDebugResources FAILED
FAILURE: Build failed with an exception.
Failed to process resources, see aapt output above for details.
用的是我上面发的那个版本嘛? v3: implementation 'com.github.SherlockGougou:BigImageViewPager:masterGlideV3-SNAPSHOT' v4: implementation 'com.github.SherlockGougou:BigImageViewPager:master-SNAPSHOT'
是的,使用的implementation 'com.github.SherlockGougou:BigImageViewPager:master-SNAPSHOT',master-SNAPSHOT换成了v4_2.2.0
不用换,直接依赖我复制的试试
试了下,依旧是报上面的错
那你的项目中原本是不是使用了PhotoView?
好的 明白了 谢谢 我再排查一下,你可以加一下这个群:271127803 或者加一下我qq:1334963094 我拉你进去
你好,你排查一下写了以下属性的布局文件: contentScrim layout_scrollFlags cardCornerRadius cardElevation layout_collapseMode statusBarScrim
把这些属性的前缀都改成app: 再试试。
这个问题和本框架没有关系
具体是哪个文件 上面的报错信息中都写了的,AAPT错误一般都是属性前缀不对导致的
您好,我整个项目全局搜索了下,你给的这些属性凡是在layout布局里的前缀都是app:,如果说跟框架本身没有关系,为啥我换成上一版本再编译就不报错了呢,这个错误是在编译时报的,不是运行过后报错
您禁用一下aapt2试试呢: 在project/gradle.properties 底部添加 android.enableAapt2=false
恩,用这个我觉得肯定是可以的,但是网上很多人说这个不能解决根本问题,之前也用过这个,后来取消了
另一个项目用新版的好像不会报错哎,刚好这个项目暂时不需要支持gif,暂时先用旧版本了
这个issue我先关闭了,有其他问题再开。
导入新版本,报错AGPBI: {"kind":"error","text":"error:,换回老版本正常,是不是因为框架引入的jar包和我项目中的冲突,新版本加的gif是增添了什么吗