java.lang.UnsatisfiedLinkError:找不到com.twilio.client.impl.useragent的实现?

时间:2015-11-17 09:43:11

标签: android twilio

我试图通过Twilio android Sdk连接通话。我可以拨打电话但是一旦我拨打电话,我的应用就会突然崩溃。

我遇到了以下问题。

STACK_TRACE=java.lang.RuntimeException: An error occured while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:304)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355)
at java.util.concurrent.FutureTask.setException(FutureTask.java:222)
at java.util.concurrent.FutureTask.run(FutureTask.java:242)
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)
Caused by: java.lang.UnsatisfiedLinkError: No implementation found for com.twilio.client.impl.useragent.Call$Stats com.twilio.client.impl.useragent.Call.getStats(int) (tried Java_com_twilio_client_impl_useragent_Call_getStats and Java_com_twilio_client_impl_useragent_Call_getStats__I)
at com.twilio.client.impl.useragent.Call.getStats(Native Method)
at com.twilio.client.impl.useragent.Call.getStats(Call.java:207)
at com.twilio.client.impl.MetricsPublisher$1.doInBackground(MetricsPublisher.java:90)
at com.twilio.client.impl.MetricsPublisher$1.doInBackground(MetricsPublisher.java:77)
at android.os.AsyncTask$2.call(AsyncTask.java:292)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
... 3 more
java.lang.UnsatisfiedLinkError: No implementation found for com.twilio.client.impl.useragent.Call$Stats com.twilio.client.impl.useragent.Call.getStats(int) (tried Java_com_twilio_client_impl_useragent_Call_getStats and Java_com_twilio_client_impl_useragent_Call_getStats__I)
at com.twilio.client.impl.useragent.Call.getStats(Native Method)
at com.twilio.client.impl.useragent.Call.getStats(Call.java:207)
at com.twilio.client.impl.MetricsPublisher$1.doInBackground(MetricsPublisher.java:90)
at com.twilio.client.impl.MetricsPublisher$1.doInBackground(MetricsPublisher.java:77)
at android.os.AsyncTask$2.call(AsyncTask.java:292)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
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)

在此处添加了gradle:

buildscript {
    repositories {
        mavenCentral()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:1.1.0'
    }
}

allprojects {
    repositories {
        jcenter()
    }
}

这是Gradle依赖项:

 dependencies {
        compile fileTree(dir: 'libs', include: '*.jar')
        compile project(':android-support-v7-appcompat')
        //compile 'com.google.android.gms:play-services-analytics:7.3.0'
        compile files('libs/google-play-services.jar')
        compile files('libs/twilioclient-android.jar')
    }

      sourceSets {
            main {
                manifest.srcFile 'AndroidManifest.xml'
                java.srcDirs = ['src']
                resources.srcDirs = ['src']
                aidl.srcDirs = ['src']
                renderscript.srcDirs = ['src']
                res.srcDirs = ['res']
                assets.srcDirs = ['assets']

            }

                     instrumentTest.setRoot('tests')


        }

1 个答案:

答案 0 :(得分:1)

听起来你需要包含本机库(armeabi / armeable-v7a / mips / x86文件夹中的那些)而不仅仅是jar文件。它们应该放在src.main.jniLibs包中。