android - Crashlytics Fabric : Failed to execute task -
i've been having issue , don't know how fix it.
my project use crashlytics, it's crash , not sent report. have timeoutexception:
08-25 03:04:31.876 2856-2856/connectivit.app e/fabric﹕ failed execute task. java.util.concurrent.timeoutexception @ java.util.concurrent.futuretask.get(futuretask.java:176) @ com.crashlytics.android.core.crashlyticsexecutorservicewrapper.executesyncloggingexception(crashlyticsexecutorservicewrapper.java:44) @ com.crashlytics.android.core.crashlyticsuncaughtexceptionhandler.uncaughtexception(crashlyticsuncaughtexceptionhandler.java:275) @ java.lang.threadgroup.uncaughtexception(threadgroup.java:693) @ java.lang.threadgroup.uncaughtexception(threadgroup.java:690) --------- beginning of crash 08-25 03:04:31.876 2856-2856/connectivit.app e/androidruntime﹕ fatal exception: main process: connectivit.app, pid: 2856 java.lang.runtimeexception: unable start activity componentinfo{connectivit.app/connectivit.app.activity.main.mainactivity}: java.lang.runtimeexception: crash @ android.app.activitythread.performlaunchactivity(activitythread.java:2298) @ android.app.activitythread.handlelaunchactivity(activitythread.java:2360) @ android.app.activitythread.access$800(activitythread.java:144) @ android.app.activitythread$h.handlemessage(activitythread.java:1278) @ android.os.handler.dispatchmessage(handler.java:102) @ android.os.looper.loop(looper.java:135) @ android.app.activitythread.main(activitythread.java:5221) @ java.lang.reflect.method.invoke(native method) @ java.lang.reflect.method.invoke(method.java:372) @ com.android.internal.os.zygoteinit$methodandargscaller.run(zygoteinit.java:899) @ com.android.internal.os.zygoteinit.main(zygoteinit.java:694) caused by: java.lang.runtimeexception: crash @ connectivit.app.activity.main.mainactivity.inittabs(mainactivity.java:117) @ connectivit.app.activity.main.mainactivity.oncreate(mainactivity.java:57) @ android.app.activity.performcreate(activity.java:5933) @ android.app.instrumentation.callactivityoncreate(instrumentation.java:1105) @ android.app.activitythread.performlaunchactivity(activitythread.java:2251) @ android.app.activitythread.handlelaunchactivity(activitythread.java:2360) @ android.app.activitythread.access$800(activitythread.java:144) @ android.app.activitythread$h.handlemessage(activitythread.java:1278) @ android.os.handler.dispatchmessage(handler.java:102) @ android.os.looper.loop(looper.java:135) @ android.app.activitythread.main(activitythread.java:5221) @ java.lang.reflect.method.invoke(native method) @ java.lang.reflect.method.invoke(method.java:372) @ com.android.internal.os.zygoteinit$methodandargscaller.run(zygoteinit.java:899) @ com.android.internal.os.zygoteinit.main(zygoteinit.java:694)
edit
my build.gradle file :
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://jitpack.io" } maven { url 'https://maven.fabric.io/public' } } android { signingconfigs { release { keyalias 'android.keystore' storefile file('/users/jordan/android.keystore.jks') storepassword "" keypassword "" } config { keyalias 'androiddebugkey' keypassword 'android' storefile file('/users/jordan/.android/debug.keystore') storepassword 'android' } } compilesdkversion 23 buildtoolsversion '23' defaultconfig { applicationid “com.test" minsdkversion 14 targetsdkversion 23 versioncode 12 versionname '1' // enabling multidex support. multidexenabled true } buildtypes { debug { versionnamesuffix "-debug" } release { minifyenabled true zipalignenabled true proguardfiles getdefaultproguardfile('proguard-android.txt'), 'proguard-rules.pro' signingconfig signingconfigs.release } } packagingoptions { exclude 'meta-inf/asl2.0' exclude 'meta-inf/license' exclude 'meta-inf/notice' } lintoptions { // set true turn off analysis progress reporting lint quiet false // if true, stop gradle build if errors found abortonerror false // if true, report errors ignorewarnings true } productflavors { } } dependencies { //--- android compile 'com.android.support:design:23.0.0' compile 'com.android.support:appcompat-v7:23.0.0' compile 'com.android.support:multidex:1.0.0' //--- fabric compile('com.crashlytics.sdk.android:crashlytics:2.4.0@aar') { transitive = true; } }
crashlytics initialization :
public class myapplication extends multidexapplication { @override public void oncreate() { super.oncreate(); fabric.with(this, new crashlytics()); if (!buildconfig.debug) { log.d("ez", "release mode. crashlytics enable"); //fabric.with(this, new crashlytics()); } else { log.d("ez", "debug mode. crashlytics disable"); } throw new runtimeexception("this crash"); } }
i fixed timeoutexception
adding following build.gradle
ext.enablecrashlytics = true
or if have several extensions already:
ext { ... enablecrashlytics = true }
Comments
Post a Comment