繁体   English   中英

致命异常:java.lang.NoSuchMethodError:没有虚拟方法 callEngineReleaseConnection(Lcom/squareup/okhttp/Call;)

[英]Fatal Exception: java.lang.NoSuchMethodError: No virtual method callEngineReleaseConnection(Lcom/squareup/okhttp/Call;)

完整的错误描述如下:

Fatal Exception: java.lang.NoSuchMethodError: No virtual method callEngineReleaseConnection(Lcom/squareup/okhttp/Call;)V in class Lcom/squareup/okhttp/internal/Internal; or its super classes (declaration of 'com.squareup.okhttp.internal.Internal' appears in /data/app/com.glossyglobe.client-1/base.apk:classes2.dex)
       at com.squareup.okhttp.ws.WebSocketCall.createWebSocket(WebSocketCall.java:125)
       at com.squareup.okhttp.ws.WebSocketCall.access$000(WebSocketCall.java:42)
       at com.squareup.okhttp.ws.WebSocketCall$1.onResponse(WebSocketCall.java:102)
       at com.squareup.okhttp.Call$AsyncCall.execute(Call.java:177)
       at com.squareup.okhttp.internal.NamedRunnable.run(NamedRunnable.java:33)
       at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
       at java.lang.Thread.run(Thread.java:818)

我不明白为什么会显示此错误。 库和依赖可能会更新,但不会 请告诉我如何解决?

buildscript {

    repositories {
        maven { url 'https://maven.fabric.io/public' }
        maven { url "https://www.jitpack.io" }
        maven { url "https://maven.google.com" }
        maven { url 'http://jcenter.bintray.com' }
        maven { url = 'https://oss.sonatype.org/content/repositories/snapshots'}
        jcenter()
        google()
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:3.6.1'
        classpath 'com.github.triplet.gradle:play-publisher:1.2.2'
        classpath 'com.google.gms:google-services:4.3.3'
        classpath 'com.google.firebase:firebase-crashlytics-gradle:2.0.0-beta02'
    }
}

apply plugin: 'com.android.application'
apply plugin: 'com.github.triplet.play'
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.crashlytics'

def AAVersion = '4.3.1'
def AmplitudeVersion = '2.9.2'
def frescoVersion = '1.2.0'

android {
    compileSdkVersion = 29
    buildToolsVersion "29.0.3"

    aaptOptions
            {
                cruncherEnabled = false
            }
    lintOptions {
        checkReleaseBuilds false
        abortOnError false
    }
    packagingOptions {
        exclude 'META-INF/NOTICE'
        exclude 'META-INF/LICENSE'
        exclude 'META-INF/*'
        exclude 'META-INF/LICENSE.txt'

        exclude 'META-INF/DEPENDENCIES'
        exclude 'META-INF/license.txt'
        exclude 'META-INF/NOTICE.txt'
        exclude 'META-INF/notice.txt'
        exclude 'META-INF/ASL2.0'
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }
}

repositories {
    mavenCentral()
    maven { url 'https://maven.fabric.io/public' }
    maven { url "http://jzaccone.github.io/SlidingMenu-aar" }
    maven { url 'http://oss.jfrog.org/artifactory/oss-snapshot-local' }
    google()
    jcenter()
}

play {
    if (!project.hasProperty('track_value')) {
        logger.info("you need pass track (alpha, beta, production) -Ptrack_value=value")
        return
    }

    if (!project.hasProperty('service_account')) {
        logger.info('Please pass service_account')
    }

    if (!project.hasProperty('key_file')) {
        logger.info('Please pass key_file')
    }

    track = track_value
    serviceAccountEmail = service_account
    pk12File = file(key_file)
}

dependencies {

    implementation 'com.parse.bolts:bolts-android:1.+'

    implementation 'com.nineoldandroids:library:2.4.0'
    implementation 'com.daimajia.easing:library:1.0.0@aar'
    implementation 'com.daimajia.androidanimations:library:1.1.2@aar'

    implementation 'com.makeramen:roundedimageview:2.0.0'

    implementation 'com.sothree.slidinguppanel:library:3.1.0'
    implementation 'com.jeremyfeinstein.slidingmenu:library:1.3@aar'

    implementation 'com.asksira.android:loopingviewpager:1.1.2'
    implementation 'com.romandanylyk:pageindicatorview:1.0.1'

    implementation "com.amplitude:android-sdk:$AmplitudeVersion"

    implementation('com.crashlytics.sdk.android:crashlytics:2.10.1@aar') { 
        transitive = true
    }

    implementation 'com.appsflyer:af-android-sdk:5.2.0@aar' //5.1.1
    implementation 'com.android.installreferrer:installreferrer:1.1.2'


    implementation "com.android.support:appcompat-v7:" + SUPPORT_LIBRARY_VERSION
    implementation "com.android.support:recyclerview-v7:" + SUPPORT_LIBRARY_VERSION
    implementation "com.android.support:cardview-v7:" + SUPPORT_LIBRARY_VERSION
    implementation "com.android.support:design:" + SUPPORT_LIBRARY_VERSION
    implementation 'android.arch.lifecycle:extensions:1.1.1'


    implementation "com.google.firebase:firebase-core:16.0.1" //16.0.1
    implementation "com.google.firebase:firebase-messaging:18.0.0" //18.0.0
    implementation 'com.google.firebase:firebase-database:17.0.0'
    implementation 'com.google.firebase:firebase-analytics:16.0.1'
    implementation 'com.google.firebase:firebase-auth:17.0.0'
    implementation 'com.google.firebase:firebase-firestore:18.0.0'

    implementation 'com.google.maps.android:android-maps-utils:0.3.4'

    implementation 'com.android.support:multidex:1.0.3'

    implementation 'org.greenrobot:eventbus:3.0.0'

    implementation 'com.squareup.retrofit2:retrofit:2.8.1'
    implementation 'com.squareup.okhttp3:logging-interceptor:4.4.1'
    implementation 'com.google.code.gson:gson:2.8.5' 

    annotationProcessor "org.androidannotations:androidannotations:$AAVersion"
    implementation "org.androidannotations:androidannotations-api:$AAVersion"

    implementation 'com.squareup.picasso:picasso:2.5.2' 
    implementation 'com.jakewharton.picasso:picasso2-okhttp3-downloader:1.1.0'

    implementation 'pl.charmas.android:android-reactive-location:0.10@aar'

    implementation 'com.googlecode.libphonenumber:libphonenumber:8.3.2'

    implementation 'com.stripe:stripe-android:7.0.1'

    implementation 'com.braintreepayments.api:drop-in:3.+'

    implementation 'com.payfort:start:0.2'

    implementation 'ru.tinkoff.acquiring:ui:1.4.5' 
    implementation 'ru.tinkoff.acquiring:card-io:1.4.5'

    implementation 'com.facebook.android:facebook-android-sdk:4.42.0' 
    implementation 'com.facebook.android:facebook-login:4.42.0' 

    implementation 'com.timqi.sectorprogressview:library:2.0.1'

    implementation 'com.github.florent37:singledateandtimepicker:2.1.1'

    implementation 'com.github.stfalcon:frescoimageviewer:0.5.0'
    implementation "com.facebook.fresco:fresco:$frescoVersion"


    implementation 'com.cesards.android:cropimageview:1.0.2.1'


    implementation 'com.hbb20:ccp:2.2.0'

    implementation 'com.netflix.rxjava:rxjava-android:0.18.4'

    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation project(':creditCardEntry')
    implementation project(':wheel')
    implementation project(':viewflow')
    implementation project(path: ':chat')

    implementation 'com.google.android.gms:play-services-maps:16.0.0'
    implementation 'com.google.android.gms:play-services-places:16.0.0'
    implementation 'com.google.android.gms:play-services-identity:16.0.0'
    implementation 'com.google.android.gms:play-services-location:16.0.0'
    implementation 'com.google.android.gms:play-services-gcm:16.0.0'
    implementation 'com.google.android.gms:play-services-base:16.0.0'

}

PS 如果信息内容数据不够,我会补充

我搜索了很长时间的解决方案,发现:结果是'com.squareup.retrofit2: retrofit: 2.8.1''com.google.firebase: firebase-firestore:18.0.0'之间存在冲突。 只需删除此: 'com.google.firebase:firebase-firestore:18.0.0'来源: https 'com.google.firebase:firebase-firestore:18.0.0'

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM