CameraKit / blurkit-android

The missing Android blurring library. Fast blur-behind layout that parallels iOS.
MIT License
3.72k stars 309 forks source link

build error,resource name has already defined #1

Closed coolstar1204 closed 7 years ago

coolstar1204 commented 7 years ago

........................................................\app\src\main\res\values\color.xml Error:(2) Attribute "title" has already been defined Error:(2) Attribute "background" has already been defined Error:(2) Attribute "thumbTextPadding" has already been defined Error:(2) Attribute "switchTextAppearance" has already been defined Error:(2) Attribute "switchMinWidth" has already been defined Error:(2) Attribute "switchPadding" has already been defined Error:(2) Attribute "switchStyle" has already been defined .................................................\app\build\intermediates\exploded-aar\com.android.support\appcompat-v7\24.2.1\res\values-v23\values-v23.xml Error:(2) Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Inverse'. Error:(2) Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Button.Colored'. Error:Execution failed for task ':app:processKuwoDebugResources'.

com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'D:\eclipse\sdk\build-tools\23.0.1\aapt.exe'' finished with non-zero exit value 1

dwillmc commented 7 years ago

Have you updated all your SDK tools to compile for android-25? That should fix the issue.

consp1racy commented 7 years ago

@dwillmc You can safely drop appcompat-v7 from the library module, it isn't used anywhere.

@coolstar1204 What happens is two versions of appcompat-v7 are imported to your project. One from your modules, one from this library. And since we can only declare attrs once, we have a name conflict.

For now add this to your app module build.gradle to override any support lib version:

configurations.all {
    resolutionStrategy.eachDependency { DependencyResolveDetails details ->
        if (details.requested.group == 'com.android.support') {
            details.useVersion '24.1.1'
        }
    }
}

Instead of 24.1.1 use whatever fits your needs.

EDIT:

True, since BlurKit mistakenly requires appcompat-v7-r25.0.1 using that in your project along with compileSdkVersion 25 will work around the issue.

dwillmc commented 7 years ago

AppCompat no longer compiled in next release so this should be resolved.