Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Crashlytics Android Studio plugin fails to initialize

I'm running Android Studio 0.5.1. I've downloaded the Crashlytics Android Studio plugin and installed it from the disc. When I restart Android Studio, I get the following exception

Plugin 'com.crashlytics.tools.androidstudio' failed to initialize and will be disabled.  Please restart Android Studio.

java.lang.NoClassDefFoundError: org/osgi/framework/BundleActivator
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClassCond(ClassLoader.java:637)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:471)
    at com.intellij.util.lang.UrlClassLoader._defineClass(UrlClassLoader.java:189)
    at com.intellij.util.lang.UrlClassLoader.defineClass(UrlClassLoader.java:185)
    at com.intellij.util.lang.UrlClassLoader._findClass(UrlClassLoader.java:161)
    at com.intellij.ide.plugins.cl.PluginClassLoader.loadClassInsideSelf(PluginClassLoader.java:124)
    at com.intellij.ide.plugins.cl.PluginClassLoader.tryLoadingClass(PluginClassLoader.java:77)
    at com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoader.java:66)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    at com.crashlytics.tools.intellij.OSGiPluginServices.createOSGi(OSGiPluginServices.java:62)
    at com.crashlytics.tools.intellij.CrashlyticsPlugin.initComponent(CrashlyticsPlugin.java:89)
    at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentConfigComponentAdapter$1.getComponentInstance(ComponentManagerImpl.java:548)
    at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentConfigComponentAdapter.getComponentInstance(ComponentManagerImpl.java:590)
    at com.intellij.util.pico.DefaultPicoContainer.getLocalInstance(DefaultPicoContainer.java:225)
    at com.intellij.util.pico.DefaultPicoContainer.getInstance(DefaultPicoContainer.java:212)
    at com.intellij.util.pico.DefaultPicoContainer.getComponentInstance(DefaultPicoContainer.java:199)
    at org.picocontainer.alternatives.AbstractDelegatingMutablePicoContainer.getComponentInstance(AbstractDelegatingMutablePicoContainer.java:75)
    at com.intellij.openapi.components.impl.ComponentManagerImpl.createComponent(ComponentManagerImpl.java:121)
    at com.intellij.openapi.application.impl.ApplicationImpl.createComponent(ApplicationImpl.java:371)
    at com.intellij.openapi.components.impl.ComponentManagerImpl.createComponents(ComponentManagerImpl.java:112)
    at com.intellij.openapi.components.impl.ComponentManagerImpl.init(ComponentManagerImpl.java:89)
    at com.intellij.openapi.components.impl.stores.ApplicationStoreImpl.load(ApplicationStoreImpl.java:87)
    at com.intellij.openapi.application.impl.ApplicationImpl.load(ApplicationImpl.java:508)
    at com.intellij.idea.IdeaApplication.run(IdeaApplication.java:150)
    at com.intellij.idea.MainImpl$1$1$1.run(MainImpl.java:46)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
    at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:715)
    at java.awt.EventQueue.access$400(EventQueue.java:82)
    at java.awt.EventQueue$2.run(EventQueue.java:676)
    at java.awt.EventQueue$2.run(EventQueue.java:674)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:86)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:685)
    at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:697)
    at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:524)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:335)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Caused by: java.lang.ClassNotFoundException: org.osgi.framework.BundleActivator PluginClassLoader[com.crashlytics.tools.androidstudio, 1.5.0]
    at com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoader.java:68)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    ... 44 more
like image 274
joates Avatar asked Mar 17 '14 19:03

joates


4 Answers

Hemal from Crashlytics here! Can you go ahead and try to install the plugin.zip file instead of the jar and let me know if that works?

like image 95
Hemal Shah Avatar answered Nov 18 '22 05:11

Hemal Shah


Use Fabric Tool.You don't need to write any code.Check out the below steps to install Crashlytics in your application.

  1. Get in to this Fabric link .Then sign up and login to your account.

  2. In Android Studio, Click File -> settings->plugin-> In top search bar, search this Fabric for Android then click browse, you see the fabric android studio file.

  3. Then download a Fabric Android Studio Plugin.Zip file.finally, restart Android Studio

  4. Then you can see the Fabric icon in your eclipse tool.Check the below screenshot:

    enter image description here

  5. Login fabric -> Enter Organization -> click install the crashlytics tool.It will add the Codes automatically.You don't need to write a single line of code.It will add codes in manifest file and build.gradle.

  6. After it successfully installed,Run your application.If your application getting crash,it will be notified in your fabric dashboard.

  7. Output:

    Below I am posted the crash report in dashboard:

    enter image description here

For further Reference: Crashlytics

like image 32
Steve Avatar answered Nov 18 '22 04:11

Steve


I had this error "NoClassDefFoundError: javax/swing/SwingUtilities"

I had to download and use jdk1.7.0_65 instead of jdk1.8.0_05 and change the path in my environment variables.

Hope this helps someone!

like image 2
Barrie Galitzky Avatar answered Nov 18 '22 05:11

Barrie Galitzky


Oh gods, i thought it's not work, but it does! It now show icon in toolbar, but i assign hotkey on crashlytics and it pop up below(!) IDEA CE 13.1.4 screen. enter image description here

like image 2
Ernest Poletaev Avatar answered Nov 18 '22 05:11

Ernest Poletaev