Gradle同步失败:无法确定com.android.support:support-v4:22.2.1的工件

时间:2019-10-10 13:38:16

标签: android gradle build.gradle

apply plugin: 'com.android.application'
apply plugin: 'io.fabric'

repositories {
    maven {
        url 'https://maven.fabric.io/public'
    }
    //maven { url 'https://mvnrepository.com/artifact/com.android.support/support-v4'}
    maven {
        url 'https://maven.google.com'
        // Alternative URL is 'https://dl.google.com/dl/android/maven2/'
    }
}
//Realm DB
apply plugin: 'realm-android'

android {
    compileSdkVersion 28
    buildToolsVersion '27.0.3'
    defaultConfig {
        applicationId "com.openquire.quirebeta"
        minSdkVersion 16
        targetSdkVersion 28
        versionCode 14
        versionName "2.1"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        multiDexEnabled true
    }

    dexOptions {
        javaMaxHeapSize "4g"
    }

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

    configurations.all {
        resolutionStrategy.force 'com.google.code.findbugs:jsr305:1.3.9'
        resolutionStrategy.dependencySubstitution {
            substitute module('org.apache.commons:commons-io:1.3.2') with module('commons-io:commons-io:1.3.2')

        }
        /*resolutionStrategy.force 'com.android.support:support-v4-28.0.0'
        resolutionStrategy.dependencySubstitution {
            substitute module('com.android.support:support-v4-22.2.1') with module('support:support-v4-22.2.1')
        }*/


    }


    repositories {
        flatDir {
            dirs 'libs'
        }
    }

    dependencies {
        implementation fileTree(include: ['*.jar'], dir: 'libs')
        implementation(name: 'imageSDK-release', ext: 'aar')

        //implementation(name: 'support-v4-22.2.1', ext: 'aar')
        //, exclude: 'android-support-v4.jar'
        //,exclude: ['android-support-*.aar']

        //implementation files('libs/support-v4-22.2.1.aar')
        implementation project(':support-v4-22')//{ transitive = true }
        //androidTestImplementation 'com.android.support:support-v4:28.0.0'
        androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
           exclude group: 'com.android.support', module: 'support-annotations'

             //exclude group: 'com.android.support', module: 'support-v4'


        })


       /* android.testVariants.all { variant ->
            variant.getCompileConfiguration().exclude group: 'com.android.support', module: 'support-v4'
            variant.getRuntimeConfiguration().exclude group: 'com.android.support', module: 'support-v4'
        }*/
        //implementation('com.android.support:support-v4:22.2.1') {
           // exclude group: 'com.android.support', module: 'support-v4'
       // }


       /* implementation ('com.android.support:appcompat-v7:28.0.0') {
            exclude group: 'com.android.support', module: 'support-v4'
        }
        implementation ('com.android.support:cardview-v7:28.0.0'){
            exclude group: 'com.android.support', module: 'support-v4'
        }

        implementation('com.android.support:support-v4:22.2.1@aar') {
            transitive = true;
        }
        implementation (name:'support-v4-22.2.1', ext:'aar')*/


        // implementation 'com.android.support:support-v4:28.0.0'
        //implementation 'com.android.support:support-v4:22.2.1'
        /* implementation(project(':support-v4:22.2.1'))
       {
           transitive = false
       }

         implementation ('com.google.android.gms:play-services-maps:16.0.0'){
            exclude group: 'com.android.support', module: 'support-v4'}
*/

        // Google libraries

        implementation 'com.android.support:appcompat-v7:28.0.0'
        implementation 'com.android.support:cardview-v7:28.0.0'
        //implementation 'com.android.support:support-core-utils:28.0.0'

        testImplementation 'junit:junit:4.12'
        // Retrofit API
        implementation 'com.squareup.retrofit2:retrofit:2.1.0'
        // JSON Parsing
        implementation 'com.google.code.gson:gson:2.8.2'
        implementation 'com.squareup.retrofit2:converter-gson:2.1.0'
        implementation 'com.squareup.okhttp3:okhttp-urlconnection:3.0.0-RC1'
        //implementation 'com.squareup.okhttp3:okhttp:3.0.0-RC1'
        //String Retrofit Parsing
        implementation 'com.squareup.retrofit2:converter-scalars:2.1.0'
        //Realm Database
        implementation 'io.realm:android-adapters:2.1.0'
        //amazon S3
        implementation 'com.amazonaws:aws-android-sdk-core:2.4.+'
        implementation 'com.amazonaws:aws-android-sdk-s3:2.4.+'
        implementation 'com.amazonaws:aws-android-sdk-cognito:2.4.+'
        //Top snack bar
        implementation 'com.androidadvance:topsnackbar:1.1.1'
        // Glide
        implementation 'com.github.bumptech.glide:glide:3.7.0'
        implementation 'com.github.bumptech.glide:okhttp-integration:1.4.0'
        // keypad visibility
        implementation 'net.yslibrary.keyboardvisibilityevent:keyboardvisibilityevent:2.1.0'
        //circle image
        implementation 'de.hdodenhof:circleimageview:2.2.0'
        //Event Bus
        implementation 'org.greenrobot:eventbus:3.1.1'
        // Permission Helper
        implementation 'pub.devrel:easypermissions:1.0.1'
        //ViewPager With Circle Indicator
        implementation 'me.relex:circleindicator:1.2.2@aar'
        //signature pad
        implementation 'com.github.gcacace:signature-pad:1.2.1'
        //zoomable imageview
        implementation 'com.github.chrisbanes:PhotoView:2.0.0'
        //fragment animation
        implementation 'com.labo.kaji:fragmentanimations:0.1.1'
        implementation('com.crashlytics.sdk.android:crashlytics:2.8.0@aar') {
            transitive = true;
        }
        implementation 'com.github.lzyzsd:circleprogress:1.2.1'
        implementation 'com.joanzapata.iconify:android-iconify-fontawesome:2.1.0'

        //compile 'com.google.android.gms:play-services:11.0.4'
        implementation 'com.google.android.gms:play-services-maps:16.0.0'
        implementation 'com.google.maps.android:android-maps-utils:0.5+'


        implementation 'it.sephiroth.android.exif:library:+'
    }
}

0 个答案:

没有答案