Note: android.support.v4.text.ICUCompatIcs: can't find dynamically referenced class libcore.icu.ICU

别说谁变了你拦得住时间么 提交于 2019-12-05 23:07:08

问题


I started getting the message with the latest Android Build Tools (ABT) v19.0.3 today. At first glance, I thought this might be an issue with ABT. However, a closer investigation reveals that this message:

android.support.v4.text.ICUCompatIcs: can't find dynamically referenced class libcore.icu.ICU

is only shown when Proguard is used. Answers on the net has yeilded no solution for me. Perhaps, this is only an issue with Proguard (the version I'm using is bundled with Android SDK v22.3).

I have added the following directives to proguard-project.txt file, but it makes no difference:

-keep interface android.support.v4.** { *; }
-keep class android.support.v4.** { *; }

Does anyone else come across this message and has a possible solution? Maybe Eric from Proguard might be able to shed some light into this issue. Maybe a code cleanup is required with Proguard? I'm interested to know the solution.


回答1:


The note says that a support class is using reflection to access a runtime class that isn't present in the target runtime. In general, it could be a sign of compatibility problems. In this case, it's harmless; the developers of the support library are precisely using reflection to avoid any linking problems with different runtime environments. You can suppress the note with:

-dontnote android.support.**


来源:https://stackoverflow.com/questions/22441366/note-android-support-v4-text-icucompatics-cant-find-dynamically-referenced-cl

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!