Bob Zheng
Bob Zheng

Reputation: 895

display err:resource previously defined here

When i run my project, display:

error: resource previously defined here. Message{kind=ERROR, text=error: resource previously defined here.

Image of Error

Upvotes: 3

Views: 3696

Answers (1)

Bob Zheng
Bob Zheng

Reputation: 895

before:

build.gradle

compile 'com.android.support:cardview-v7:26.0.0-alpha1'
compile 'com.android.support:support-v4:26.0.0-alpha1'
implementation 'com.android.support.constraint:constraint-layout:2.0.0-alpha2'

After:

build.gradle

compile 'com.android.support:cardview-v7:26.0.0-alpha1'
compile 'com.android.support:support-v4:26.0.0-alpha1'

remove implementation 'com.android.support.constraint:constraint-layout:2.0.0-alpha2'

It is OK.

cause: I created new activity, Android Studio add a line in build.gradle:

implementation 'com.android.support.constraint:constraint-layout:1.1.2'

Upvotes: 1

Related Questions