首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >为什么Android Studio 4.1无法启动?

为什么Android Studio 4.1无法启动?
EN

Stack Overflow用户
提问于 2020-11-09 01:45:30
回答 4查看 410关注 0票数 6

我尝试在AppData中重新安装和删除所有与android studio相关的文件夹。我收到以下错误-

代码语言:javascript
复制
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)

为什么会发生这种情况?

EN

回答 4

Stack Overflow用户

发布于 2020-11-09 01:45:30

我通过在Android Studio安装文件夹中编辑idea.properties文件并取消对下面这行的注释,解决了这个问题。

代码语言:javascript
复制
idea.config.path=${user.home}/.AndroidStudio/config

在取消上面的注释后,Android Studio 4.1正常启动。

我浪费了太多的时间来解决这个问题,所以在这里发帖,这样可以帮助其他人。

票数 10
EN

Stack Overflow用户

发布于 2021-01-01 11:59:23

我在这里找到了这个bug:https://issuetracker.google.com/issues/171901414

这对我很有效:

已通过在%%APPDATA%\Google\AndroidStudio4.1\options\usage.statistics.xml中将"allow“设置为false解决

票数 2
EN

Stack Overflow用户

发布于 2021-02-24 06:31:10

谷歌在他们的网站上将此列为已知问题,他们建议删除配置以恢复默认状态。

因此,如果您删除%%AppData%%\Roaming\Google\AndroidStudio4.1,它应该会正确启动,但您必须重新安装任何第三方插件。

https://developer.android.com/studio/known-issues#studio-config-directories

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/64741228

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档