shwenzhang / AndResGuard

proguard resource for Android by wechat team
Apache License 2.0
8.54k stars 1.54k forks source link

Failed to resolve attribute at index 1: TypedValue #198

Closed a137235 closed 7 years ago

a137235 commented 7 years ago

@simpleton 会将所有的?attr/去掉,如:"?attr/d1"替换成"?d1",就会直接报以上错误,版本为1.2.6

simpleton commented 7 years ago

@a137235 可能是个bug,你这边可以先用回1.2.3的版本试试。

a137235 commented 7 years ago

我这个有个错误1.2.6才解决的,没法试1.2.3呀

simpleton commented 7 years ago

OK,收到。你要不发一下你未混淆的包,我这边fix了通知你

On Sep 20, 2017 11:20 AM, "HeYufeng" notifications@github.com wrote:

我这个有个错误1.2.6才解决的,没法试1.2.3呀

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/shwenzhang/AndResGuard/issues/198#issuecomment-330734212, or mute the thread https://github.com/notifications/unsubscribe-auth/AAbvYk_PtlhXIZhUgNRtsc_n5HPBJrZXks5skIRzgaJpZM4PakgH .

a137235 commented 7 years ago

已上传,worldad.cn/app-debug.apk

simpleton commented 7 years ago

@a137235 你传的这个包似乎是资源混淆后的,我需要的是混淆前的包

simpleton commented 7 years ago

@a137235 你这里?attr/具体指的是去访问的属性么?可否给出可以复现错误的代码片段?

a137235 commented 7 years ago

@simpleton 未混淆包已经替换,直接xml引用就报错了,我检查混淆后的xml就少了?attr/。

simpleton commented 7 years ago

@a137235 我这边用你提供的apk混淆后可以运行起来,出错的点是哪里呢?

另外我在sample中简单增加了,并没有复现问题。这个是需要如何配置才可以复现呢?

<TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="Hello World!"
        android:textColor="?attr/colorPrimary"/>
a137235 commented 7 years ago

@simpleton 出错点在三个点菜单那里,具体原因我也没仔细分析。

simpleton commented 7 years ago

@a137235 没混淆的apk,点菜单也会crash...

a137235 commented 7 years ago

额忘记测试原包了,那就对不起了耽误你时间了。

simpleton commented 7 years ago

没事,我这边先close了。有别的问题再提issue