2017-05-05 36 views
0

喜IM Android Studio中的工作与org.msgpack:msgpack:0.6.12, 应用程序编译,但在运行时,告诉我这个exepction:java.lang.NoClassDefFoundError:org.msgpack.template.TemplateRegistry Android Studio中

Process: com.procibernetica.moca, PID: 10164 java.lang.NoClassDefFoundError: org.msgpack.template.TemplateRegistry at org.msgpack.MessagePack.(MessagePack.java:60)

My grade: 

apply plugin: 'com.google.gms.google-services' 
apply plugin: 'com.android.application' 
android { 
    compileSdkVersion 25 
    buildToolsVersion '25.0.0' 
    defaultConfig { 
     applicationId "com.procibernetica.moca" 
     minSdkVersion 19 
     targetSdkVersion 25 
     versionCode 1 
     versionName "1.0" 
     multiDexEnabled true 
     testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 

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

dependencies { 
    compile fileTree(include: ['*.jar'], dir: 'libs') 
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { 
     exclude group: 'com.android.support', module: 'support-annotations' 
    }) 

    compile 'com.android.support:support-v4:23.4.0' 
    compile 'com.android.support:appcompat-v7:23.4.0' 

    compile 'com.google.android.gms:play-services-gcm:9.6.1' 
    compile 'com.google.android.gms:play-services-location:9.6.1' 
    compile 'com.google.android.gms:play-services-ads:9.6.1' 
    compile 'com.google.android.gms:play-services-maps:9.6.1' 
    compile 'com.google.android.gms:play-services-auth:9.6.1' 

    compile 'com.google.gms:google-services:3.0.0' 

    compile 'com.google.firebase:firebase-database:9.6.1' 
    compile 'com.google.firebase:firebase-core:9.6.1' 
    compile 'com.google.firebase:firebase-auth:9.6.1' 
    compile 'com.google.firebase:firebase-auth:9.6.1' 

     compile 'org.msgpack:msgpack:0.6.12' 
    compile 'com.facebook.android:facebook-android-sdk:[4,5)' 

    compile 'com.android.support.constraint:constraint-layout:1.0.0-beta4' 

    compile 'com.github.satyan:sugar:1.5' 
    compile 'com.android.support:design:25.3.1' 
    compile('com.mapbox.mapboxsdk:mapbox-android-sdk:[email protected]') { 
     transitive = true 
    } 
    compile project(':moca-sdk-android-1.9.6') 
    testCompile 'junit:junit:4.12' 

} 

我的结构

enter image description here

+0

你能分享你的项目结构? –

+0

当你我的项目结构时,请参考LIBS和包? –

+0

是的,这是正确的 –

回答

0

我现在可以看到,你有型.aar的扩展那里,没有的.jar,尝试做wnload的MOCA-sdk.jar,如果你不能找到它或什么的,试试这个:

dependencies { 
    compile(name:'moca-sdk-android-1.9.6', ext:'aar') 
} 
repositories{ 
     flatDir{ 
       dirs 'libs' 
     } 
}