android - 无法解析 : com. afollestad :bridge:5. 1.2

标签 android android-gradle-plugin

我有 Android Studio 3.2.1,但在同步我的项目时遇到问题。

错误:

Failed to resolve: com.afollestad:bridge:5.1.2
Show in File
Show in Project Structure dialog

更新: 该错误在 android studio 3.4 中仍然存在

我的 gradles 文件是:

应用:

buildscript {
    repositories {
        maven { url 'https://maven.fabric.io/public' }
    }

    dependencies {
        classpath 'io.fabric.tools:gradle:1.+'
    }
}

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

repositories {
    maven { url 'https://maven.fabric.io/public' }
}

android {
    lintOptions {
        checkReleaseBuilds false
//        abortOnError false
    }
    signingConfigs {
        Signing_Release {
            keyAlias project.keyAlias
            keyPassword project.keyPassword
            storeFile file(project.storeFile)
            storePassword project.storePassword
        }
    }

    compileSdkVersion 28
    defaultConfig {
        applicationId "XXXXXXXXXXXXXXXXXXXXXXXX"
        minSdkVersion 16
        targetSdkVersion 28
        versionCode 1
        versionName "3.7"
        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        multiDexEnabled true
    }

    productFlavors {
        app1 {
            applicationId 'XXXXXXXXXXXXXXXXXXXXXXXXXXXX'
            buildConfigField "String", "URL_BASE", "https://XXXXXXXXXXXXXXXXXXXXXXXXXXXX"
            versionCode 16
            flavorDimensions "default"
            signingConfig signingConfigs.Signing_Release
        }
        app2 {
            applicationId 'com.assertsoft.assertforms.centenarioseguridad'
            buildConfigField "String", "URL_BASE", "\"https://centenarioseguridad.onfieldsystem.cl/rest/\""
            versionCode 1
            flavorDimensions "default"
        }
        app3 {
            applicationId 'XXXXXXXXXXXXXXXXXXXXXXXXXXXX'
            buildConfigField "String", "URL_BASE", "https://XXXXXXXXXXXXXXXXXXXXXXXXXXXX"
            versionCode 16
            flavorDimensions "default"
            signingConfig signingConfigs.Signing_Release
        }
        app4 {
            applicationId 'XXXXXXXXXXXXXXXXXXXXXXXXXXXX'
            buildConfigField "String", "URL_BASE", "https://XXXXXXXXXXXXXXXXXXXXXXXXXXXX"
            versionCode 1
            minSdkVersion 1
            flavorDimensions "default"
            signingConfig signingConfigs.Signing_Release
        }
        app5 {
            applicationId 'XXXXXXXXXXXXXXXXXXXXXXXXXXXX'
            buildConfigField "String", "URL_BASE", "https://XXXXXXXXXXXXXXXXXXXXXXXXXXXX"
            versionCode 1
            minSdkVersion 1
            flavorDimensions "default"
            signingConfig signingConfigs.Signing_Release
        }
    }

    buildTypes {
        debug {
            buildConfigField "Boolean", "ANALYTICS_ENABLE", "false"
        }
        release {
            buildConfigField "Boolean", "ANALYTICS_ENABLE", "true"
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}

ext {
    playServicesVersion = '11.8.0'
    retrofitVersion = '2.1.0'
    mlVisionVersion = '18.0.2'
}

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation('com.crashlytics.sdk.android:crashlytics:2.9.9@aar') {
        transitive = true;
    }
    implementation project(':camara')
    implementation 'androidx.multidex:multidex:2.0.1'
    implementation('com.afollestad:bridge:5.1.2') {
        exclude group: 'org.json', module: 'json'
    }

    implementation 'androidx.appcompat:appcompat:1.0.2'
    implementation 'androidx.legacy:legacy-support-v4:1.0.0'
    implementation 'com.jakewharton:butterknife:10.1.0'
    implementation 'com.squareup.okhttp3:okhttp:3.10.0'
    implementation 'com.squareup.okhttp3:logging-interceptor:3.8.0'
    implementation "com.squareup.retrofit2:retrofit:$retrofitVersion"
    implementation "com.squareup.retrofit2:converter-gson:$retrofitVersion"
    implementation 'androidx.cardview:cardview:1.0.0'
    implementation 'com.github.instacart.truetime-android:library:3.3'
    implementation 'com.google.android.gms:play-services-vision:17.0.2'
    implementation 'com.google.android.gms:play-services-location:16.0.0'
    implementation 'com.google.android.gms:play-services-maps:16.1.0'
    implementation 'com.google.firebase:firebase-messaging:17.5.0'
    implementation 'com.karumi:dexter:5.0.0'
    implementation 'com.evernote:android-job:1.2.5'
    implementation 'com.google.android.material:material:1.0.0'
    implementation 'com.mcxiaoke.viewpagerindicator:library:2.4.1@aar'
    implementation 'com.github.HotBitmapGG:RingProgressBar:V1.2.2'
    implementation 'org.greenrobot:eventbus:3.1.1'
    implementation 'com.uncopt:android.justified:1.0'
    implementation 'com.valdesekamdem.library:md-toast:0.9.0'
    implementation 'io.realm:android-adapters:2.1.0'
    implementation 'com.github.gcacace:signature-pad:1.2.1'
    implementation 'me.relex:circleindicator:1.2.2@aar'
    implementation 'com.github.chrisbanes:PhotoView:2.3.0'
    implementation 'com.aurelhubert:ahbottomnavigation:2.1.0'
    implementation 'com.firebase:firebase-jobdispatcher:0.8.5'
    implementation 'com.google.firebase:firebase-core:16.0.8'
    implementation 'com.grappes:Infinix-Indicator:1.0.2'
    implementation 'androidx.gridlayout:gridlayout:1.0.0'
    implementation 'com.savvi.datepicker:rangepicker:1.2.0'
    implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
    implementation 'com.github.bumptech.glide:glide:4.9.0'
    annotationProcessor 'com.jakewharton:butterknife-compiler:10.1.0'
    implementation 'com.facebook.stetho:stetho:1.5.0'
    implementation 'com.uphyca:stetho_realm:2.3.0'
    implementation 'com.github.takusemba:spotlight:1.6.1'
    //    implementation "com.google.firebase:firebase-ml-vision:$mlVisionVersion"
    implementation 'de.hdodenhof:circleimageview:3.0.0'
    implementation 'com.robertlevonyan.view:MaterialChipView:1.2.5'
    debugImplementation 'com.squareup.leakcanary:leakcanary-android:1.6.2'
    releaseImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.6.2'
    debugImplementation 'com.squareup.leakcanary:leakcanary-support-fragment:1.6.2'
    // TESTING
    testImplementation 'junit:junit:4.12'
    androidTestImplementation('androidx.test.espresso:espresso-core:3.1.0-alpha4', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
}
apply plugin: 'realm-android'
apply plugin: 'com.google.gms.google-services'

项目:

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        //jcenter()
        google()
        jcenter({url "http://jcenter.bintray.com/"})
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.3.2'
        classpath "io.realm:realm-gradle-plugin:5.2.0"
        classpath 'com.google.gms:google-services:4.2.0'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        //jcenter()
        jcenter({url "http://jcenter.bintray.com/"})
        mavenCentral()
        maven { url 'https://github.com/WickeDev/stetho-realm/raw/master/maven-repo' }
        maven { url "https://jitpack.io" }
        maven { url  "https://dl.bintray.com/dgunjit14/Infinix-Indicator" }
        google()
    }

    // Workaround for https://issuetracker.google.com/117900475
    // Remove when upgrading to AGP 3.4 or higher.
    configurations.matching { it.name == '_internal_aapt2_binary' }.all { config ->
        config.resolutionStrategy.eachDependency { details ->
            details.useVersion("3.5.0-alpha03-5252756")
        }
    }
}

project.ext {
    keyAlias = 'xxxxxxxx'
    keyPassword = 'xxxxxxxx'
    storeFile = 'xxxxxx.jks'
    storePassword = 'xxxxxxxxxxx'
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

最佳答案

此库不再可用。您可以在此处下载 JAR:https://mvnrepository.com/artifact/com.afollestad/bridge/5.1.2

您应该尽快迁移到另一个解决方案。

关于android - 无法解析 : com. afollestad :bridge:5. 1.2,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55927720/

相关文章:

android - Card_view Material 设计

android - 在 Android 中更改 ProgressBar fps

java - 找不到类 'twitter4j.http.AccessToken'

android - 以编程方式获取 manifestPlaceholders

android - 错误 : "Program type already present: androidx.versionedparcelable.CustomVersionedParcelable"

java - wifi广播接收器多个 Intent

android - Dagger2 依赖组件

android - 主机名与证书主题不匹配

android - 执行过去迭代备份时出现异常 : Source

gradle - 试图理解关于 gradle 示例的 "from"闭包中的 "into"