2

I've noticed that after implementation 'com.google.android.material:material:1.0.0-alpha3' to my build.gradle kotlin android extensions stop working.

Imports like this import kotlinx.android.synthetic.main.<some layout>.* became unused and all layout ids became unresolved.

I've tried to add androidExtensions {experimental = true} to build.gradle, but it didn't help.

Has anyone faced the same issue? Is there a solution for that?

I use AS 3.2 canary 17 and kotlin 1.2.41

Update: this happens only in fragments

Dmitriy
  • 135
  • 1
  • 8
  • Any error message? – Abner Escócio Jun 07 '18 at 19:41
  • Did you re-sync and rebuild? I always get R.id s unresolved after changing up gradle without rebuild. – Pawel Jun 07 '18 at 23:07
  • I've tried tosync, rebuild, invalidate cache and restart. Error message `Unresolved reference. None of the following candidates is applicable because of receiver type mismatch`. Everything works if I delete com.google.android.material dependency. – Dmitriy Jun 08 '18 at 02:12
  • Did you manage to solve this? Got the same problem using the latest Material library beta – Kieron Jul 24 '18 at 16:25
  • Yes, I've solved it by replacing all dependencies wit this: `implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" implementation 'androidx.multidex:multidex:2.0.0' implementation 'androidx.appcompat:appcompat:1.0.0-beta01' implementation 'com.google.android.material:material:1.0.0-beta01' implementation "androidx.recyclerview:recyclerview:1.0.0-beta01" implementation 'androidx.constraintlayout:constraintlayout:1.1.2'` – Dmitriy Jul 26 '18 at 03:01

1 Answers1

0

I got the same problem. In my case, what causes the problem is implementation 'com.wdullaer:materialdatetimepicker:4.2.1'

ib_ganz
  • 111
  • 1
  • 8