jeudi 13 août 2015

Error while compiling Google Services on Android Studio

So I am trying to add Google Services to my existing application (http://ift.tt/1uCoApM), however, upon adding

compile 'com.google.android.gms:play-services:7.8.0'

to my build.gradle I face the following errors, which should be only displayed if the libs are added twice.

G:\AndroidstudioProjects\SnapPref\app\src\main\res\values\colors.xml Error:(2) Attribute "adSize" has already been defined Error:(2) Attribute "adSizes" has already been defined Error:(2) Attribute "adUnitId" has already been defined Error:(2) Attribute "mapType" has already been defined Error:(2) Attribute "cameraBearing" has already been defined Error:(2) Attribute "cameraTargetLat" has already been defined Error:(2) Attribute "cameraTargetLng" has already been defined Error:(2) Attribute "cameraTilt" has already been defined Error:(2) Attribute "cameraZoom" has already been defined Error:(2) Attribute "uiCompass" has already been defined Error:(2) Attribute "uiRotateGestures" has already been defined Error:(2) Attribute "uiScrollGestures" has already been defined Error:(2) Attribute "uiTiltGestures" has already been defined Error:(2) Attribute "uiZoomControls" has already been defined Error:(2) Attribute "uiZoomGestures" has already been defined Error:(2) Attribute "useViewLifecycle" has already been defined Error:(2) Attribute "zOrderOnTop" has already been defined Error:(2) Attribute "environment" has already been defined Error:(2) Attribute "fragmentStyle" has already been defined Error:(2) Attribute "fragmentMode" has already been defined Error:(2) Attribute "buyButtonHeight" has already been defined Error:(2) Attribute "buyButtonWidth" has already been defined Error:(2) Attribute "buyButtonText" has already been defined Error:(2) Attribute "buyButtonAppearance" has already been defined Error:(2) Attribute "maskedWalletDetailsTextAppearance" has already been defined Error:(2) Attribute "maskedWalletDetailsHeaderTextAppearance" has already been defined Error:(2) Attribute "maskedWalletDetailsBackground" has already been defined Error:(2) Attribute "maskedWalletDetailsButtonTextAppearance" has already been defined Error:(2) Attribute "maskedWalletDetailsButtonBackground" has already been defined Error:(2) Attribute "maskedWalletDetailsLogoTextColor" has already been defined Error:(2) Attribute "maskedWalletDetailsLogoImageType" has already been defined G:\AndroidstudioProjects\SnapPref\app\build\intermediates\exploded-aar\com.google.android.gms\play-services-wallet\7.8.0\res\values\wallet_styles.xml Error:(36, 43) String types not allowed (at 'buyButtonAppearance' with value 'google_wallet_classic').

My current build.gradle:

apply plugin: 'com.android.application'

android {
    compileSdkVersion 21
    buildToolsVersion "21.1.2"

    defaultConfig {
        applicationId "com.marz.snapprefs"
        minSdkVersion 11
        targetSdkVersion 21
        versionCode 13
        versionName "1.4.3 beta 4"
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
        }
    }
}
repositories {
    mavenCentral()
}

dependencies {
    compile 'com.google.android.gms:play-services:7.8.0'
    provided files('lib/XposedBridgeApi-54.jar')
    compile 'net.rdrei.android.dirchooser:library:2.1@aar'
    compile 'com.googlecode.mp4parser:isoparser:1.0.5.4'
}

My colors.xml:

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <color name="background_gray_color">#fff5f5f5</color>
    <color name="common_action_bar_splitter">#ffd2d2d2</color>
    <color name="divider_grey">#ffefefef</color>
    <color name="header_divider">#ff999999</color>
    <color name="green">#00a650</color>
    <color name="white">#ffffffff</color>
    <color name="black">#ff000000</color>
    <color name="camera_activity_picture_text_message_background">#99000000</color>
    <color name="transparent">#000000</color>
    <color name="black_sixty_opacity">#99000000</color>
</resources>

I hope you guys have any suggestions, before this error gets me insane. Thanks in advance!



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire