android studio crashlytics,Crashlytics plugin (2.2.2) can't be initialized on Android Studio (1.1.0)

问题

I've restarted Android Studio (version 1.1.0 built on 18 Feb) & now Crashlytics can't be initialized with this error:

NullPointerException: update failed for AnAction with ID=Actions.Crashlytics.CrashlyticsAction

What should I do to fix it?

I have the following in my build.gradle (I'm writing here only crashlytics related configurations):

buildscript {

repositories {

maven { url 'https://maven.fabric.io/public' }

}

dependencies {

classpath 'io.fabric.tools:gradle:1.+'

}

}

apply plugin: 'io.fabric'

repositories {

maven { url 'https://maven.fabric.io/public' }

}

dependencies {

compile('com.crashlytics.sdk.android:crashlytics:2.2.2@aar') {

transitive = true;

}

}

回答1:

Your plugin version is probably outdated.

Remove the old version of plugin (File - Settings - Plugins - choose "Fabric for Android Studio" - press "Uninstall plugin").

Download the new version from Fabric dashboard (there is a button on the left bar "Download plugin". Install plugin from disk (File - Settings - Plugins - button "Install plugin from disk" on the bottom).

回答2:

If you can't solve this issue, I found a way that worked (Android Studio 1.1 on OSX).

Uninstall AS.

Delete the following (~ is home directory of user who runs AS):

~/.android*

~/.Android*

~/Library/Preferences/AndroidStudio*

~/Library/Preferences/com.google.android*

~/Library/Caches/Android*

~/Library/Android*

~/Library/Caches/com.crashlytics*

~/Library/Application Support/AndroidStudio*

~/Library//Saved Application State/com.google.android.studio.savedState

Then re-install Android Studio and the Fabric plugin, and it should work now.

I don't know if all the above deletes are necessary, but I could not narrow it down any further, and deleting all the above after uninstalling, then re-installing, worked for me.

回答3:

Actually i am phasing similar kind of stuff in Crashlytics plug-in.

Crashlytics which is installed by colleague in their computer then application code is continue with my computer but in my computer not updated with crashlytics(2.3.1) plug-in that's why generating NoClassDefFoundError

After doing some step to achieve success..

Step:1

Uninstall fabric plug-in and reinstall them

(File - Settings - Plugins - choose "Fabric for Android Studio" - press "Uninstall plugin").

Step:2

Reinstall fabric plug-in Fabric plugin

(File - Settings - Plugins - press "(File - Settings - Plugins - choose "Fabric for Android Studio" - press "Uninstall plugin"). ").

MUST REMEMBER

android:name="io.fabric.ApiKey"

android:value="75a7814087xxxxxxxxxxxxxxxx" />

check to update value after installed new plug-in

来源:https://stackoverflow.com/questions/29195117/crashlytics-plugin-2-2-2-cant-be-initialized-on-android-studio-1-1-0

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值