添加结构crashlytics后我收到错误,因为没有类定义发现android 4.4中的MultiPartBuildEntry错误
java.lang.NoClassDefFoundError: org.apache.http.entity.mime.MultipartEntityBuilder
at clovewearable.commons.social.server.SignUpService.generateMultiPartPayload(SignUpService.java:171)
at clovewearable.commons.social.server.SignUpService.triggerAPICall(SignUpService.java:110)
at clovewearable.commons.social.ui.SignUpFragment.triggerAPICall(SignUpFragment.java:585)
at clovewearable.commons.social.ui.SignUpFragment.validateNormalSignIn(SignUpFragment.java:388)
at clovewearable.commons.social.ui.SignUpFragment.onClick(SignUpFragment.java:427)
at android.view.View.performClick(View.java:4640)
at android.view.View$PerformClick.run(View.java:19421)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5476)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1268)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1084)
at dalvik.system.NativeStart.main(Native Method)
答案 0 :(得分:0)
要在一个类中初始化织物,我们必须启动织物催化剂。
使用onCreate
中的以下行初始化结构:
Fabric.with(this, new Crashlytics());
答案 1 :(得分:0)
您的Application.class
应该从MultiDexApplication
为此你应该在你的gradle中添加这样的代码
android {
defaultConfig {
...
multiDexEnabled true
}
dependencies {
...
compile 'com.android.support:multidex:1.0.2'
}