Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is Android Studio 4.1 Failing to Start?

I tried reinstalling and deleting all android studio related folders in AppData. I am getting following error -

2020-11-08 22:53:27,162 [   1831]  ERROR - rationStore.ComponentStoreImpl - Conflicting component name 'UsagesStatistic': class com.intellij.internal.statistic.persistence.UsageStatisticsPersistenceComponent and class com.intellij.internal.statistic.persistence.UsageStatisticsPersistenceComponent (componentManager=Application (containerState=ACTIVE) )
java.lang.Throwable: Conflicting component name 'UsagesStatistic': class com.intellij.internal.statistic.persistence.UsageStatisticsPersistenceComponent and class com.intellij.internal.statistic.persistence.UsageStatisticsPersistenceComponent (componentManager=Application (containerState=ACTIVE) )
        at com.intellij.openapi.diagnostic.Logger.error(Logger.java:146)
        at com.intellij.configurationStore.ComponentStoreImpl.doAddComponent(ComponentStoreImpl.kt:352)
        at com.intellij.configurationStore.ComponentStoreImpl.initPersistenceStateComponent(ComponentStoreImpl.kt:137)
        at com.intellij.configurationStore.ComponentStoreImpl.initComponent(ComponentStoreImpl.kt:103)
        at com.intellij.configurationStore.ComponentStoreWithExtraComponents.initComponent(ComponentStoreWithExtraComponents.kt:50)
        at com.intellij.serviceContainer.ComponentManagerImpl.initializeComponent$intellij_platform_serviceContainer(ComponentManagerImpl.kt:358)
        at com.intellij.serviceContainer.ComponentManagerImpl.createLightService(ComponentManagerImpl.kt:598)
        at com.intellij.serviceContainer.ComponentManagerImpl.getOrCreateLightService(ComponentManagerImpl.kt:486)
        at com.intellij.serviceContainer.ComponentManagerImpl.getLightService$intellij_platform_serviceContainer(ComponentManagerImpl.kt:458)
        at com.intellij.serviceContainer.ComponentManagerImpl.doGetService(ComponentManagerImpl.kt:401)
        at com.intellij.serviceContainer.ComponentManagerImpl.getService(ComponentManagerImpl.kt:394)
        at com.intellij.openapi.components.ServiceManager.getService(ServiceManager.java:20)
        at com.intellij.internal.statistic.persistence.UsageStatisticsPersistenceComponent.getInstance(UsageStatisticsPersistenceComponent.java:54)
        at com.intellij.ide.gdpr.ConsentOptions.saveConfirmedConsents(ConsentOptions.java:238)
        at com.intellij.ide.gdpr.ConsentOptions.setSendingUsageStatsAllowed(ConsentOptions.java:138)
        at com.intellij.ide.gdpr.ConsentOptionsProviderImpl.setSendingUsageStatsAllowed(ConsentOptionsProviderImpl.java:14)
        at com.intellij.internal.statistic.persistence.UsageStatisticsPersistenceComponent.loadState(UsageStatisticsPersistenceComponent.java:74)

Why does this happen ?

like image 657
Punit Pandey Avatar asked Nov 08 '20 17:11

Punit Pandey


People also ask

How do I fix Android Studio not opening?

How do I fix launching Studio error? Open Start menu > computer > System Properties > Advanced System Properties. In the Advanced tab > Environment Variables, add a new system variable JAVA_HOME that points to your JDK folder, for example, C:\Program Files\Java\jdk1. 7.0_21.

Why Android Studio is not running the app?

Unplug your device from the USB port on the computer. Restart the device by powering off and back on. Verify that Settings => Developer options => USB Debugging is enabled. Quit and re-launch Android Studio.

Why Android Studio is not working in my laptop?

Open Start menu > Computer > System Properties > Advanced System Properties In the Advanced tab > Environment Variables. Add new system variable JAVA_HOME that points to JDK folder, C:\Program Files\Java\jdk1. 7.0_13\


2 Answers

I got resolution to this problem by editing idea.properties file inside Android Studio installation folder and uncommented following line -

idea.config.path=${user.home}/.AndroidStudio/config

After uncommenting above line, Android Studio 4.1 started properly.

I wasted too much time resolving this issue, so posting here so it can help others.

like image 91
Punit Pandey Avatar answered Oct 05 '22 23:10

Punit Pandey


I found the bug filed here: https://issuetracker.google.com/issues/171901414

This worked for me:

Solved by setting "allow" to false in %%APPDATA%\Google\AndroidStudio4.1\options\usage.statistics.xml

like image 23
pfalstad Avatar answered Oct 05 '22 23:10

pfalstad