2

I'm facing a strange issue. When I use following attributes that perfectly working and I can see the ripple effect in the device.

android:foreground="?selectableItemBackgroundBorderless"

android:background="?selectableItemBackgroundBorderless"

But in IDE It shows an error cannot resolve symbol '?selectableItemBackgroundBorderless'.

Android Studio: v3.1.2

compileSdkVersion 27
buildToolsVersion "27.0.3"

support_version = '27.1.1'

what could be the issue?

Bhuvanesh BS
  • 13,474
  • 12
  • 40
  • 66

2 Answers2

3

I have faced same issue with 27.0.3

With 27.0.3 version

enter image description here

With 27.0.2 version

enter image description here

Use 27.0.2 instead of 27.0.3

Than

Clean-ReBuild-Run You project

EDIT

if you want to use 27.0.3 than follow this answer https://stackoverflow.com/a/48734990/7666442

AskNilesh
  • 67,701
  • 16
  • 123
  • 163
0

From API version Level 21 onwards use:

android:foreground="?android:attr/selectableItemBackgroundBorderless"
android:background="?android:attr/selectableItemBackgroundBorderless"
Yash Parikh
  • 199
  • 1
  • 9