Android:工具栏图标,列表项和溢出菜单的背景失真 [英] Android: Distorted background for toolbar icons, list items and overflow menu
问题描述
在开发android应用程序时,我更新了android studio以及android sdk.在那之后,我面临着奇怪的行为.单击动作栏图标,溢出菜单和微调框等任何项目时,背景都会失真,如下图所示.
While developing an android app, i updated android studio and also android sdk. after that, i faced strange behavior. when clicking on any item like actionbar icons, overflow menu and spinners get distorted background like picture below.
我的SDK版本为:
Android支持存储库32
Android support repository 32
Android支持库23.2.1
Android support library 23.2.1
Android SDK工具25.1.6
Android SDK tools 25.1.6
Android SDK Build-tools 23.0.2
Android SDK Build-tools 23.0.2
Android 6.0(API 23)
Android 6.0 (API 23)
SDK平台修订版3
SDK platform Rev 3
在模拟器和USB设备上也是如此,并且清理和重建项目并不能解决问题.
its same on emulator and usb device, and cleaning and rebuilding the project didn't solved the problem.
此外,我还没有在style.xml中放置任何代码来自定义这些项目,并且我使用了android默认样式.
Also, i have not put any code in style.xml to customize these items and i use the android default styles.
推荐答案
终于,经过一周的挑战并在这里提出问题之后,我终于找到了答案:
finally i found the answer after a week of challenging and asking here:
我当时使用的是android gradle插件2.2.0-alpha,因此引起了问题.我不知道这可能是此类问题的根源.
i was using android gradle plugin 2.2.0-alpha and the problem was rised from that. i didn't know that it can be the source of such problem.
返回gradle插件2.1.0之后,问题解决了!
after returning to gradle plugin 2.1.0 the problem solved!
这篇关于Android:工具栏图标,列表项和溢出菜单的背景失真的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!