如何使用@ColorInt int
声明32位无符号颜色值?
当我使用它时,在构建时会得到一个Cannot find symbol class ColorInt
。
最佳答案
您可能缺少依赖性。加
compile 'com.android.support:support-annotations:23.4.0'
到
build.gradle
中的“依赖项”部分。或者,您可以使用Project Structure Dialog
,选择模块,然后转到“ dependency
”部分。在这里单击+
,然后单击“库依赖”。从那里您可以选择support-annotations
关于android - 如何使用@ColorInt,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/37238521/