5

I'm getting this error after add compile 'com.android.support:design:22.2.0' to my gradle file: .../app/build/intermediates/exploded-aar/com.android.support/appcompat-v7/22.2.0/res/values/values.xml with this message Error:(1) Attribute "insetForeground" has already been defined.

I have this on my build.gradle file: `

compile 'com.android.support:design:22.2.0'
compile 'com.android.support:cardview-v7:22.2.0'
compile 'com.android.support:recyclerview-v7:22.2.0'
compile 'com.google.android.gms:play-services-base:7.5.0'
compile 'com.google.android.gms:play-services-location:7.5.0'
compile 'com.google.android.gms:play-services-gcm:7.5.0'
compile 'com.google.android.gms:play-services-maps:7.5.0'

I have omitted AppCompat Support Library as this article says.

How can I fix it?

epool
  • 6,710
  • 7
  • 38
  • 43

1 Answers1

11

You might have ScrimInsetsFrameLayout for your Navigation drawer design in your project. Remove those attribute resources in your attr and replace the drawer layout with NavigationView.

Hsingchien Cheng
  • 594
  • 6
  • 13
  • 5
    And I just found that Google puts `ScrimInsetsFrameLayout` right [inside the Android design support library](https://android.googlesource.com/platform/frameworks/support/+/master/design/src/android/support/design/internal/ScrimInsetsFrameLayout.java?autodive=0%2F%2F%2F). – Hsingchien Cheng May 30 '15 at 07:34