IDEA Plugin导致Android Studio打开失败问

2021-05-31  本文已影响0人  sjandroid

问题

  • 安装 【AMS Bytecode outline】插件时,由于该插件不支持当前版本Andriod Studio(4.1.1),所以想升级下AS看看能否解决这个问题。
  • 升级AS到4.2不仅没能解决这个问题,还导致打开AS就报错,具体报错信息如下:
Internal error. Please refer to https://code.google.com/p/android/issues

java.util.concurrent.CompletionException: com.intellij.diagnostic.PluginException: Fatal error initializing 'com.android.tools.idea.AndroidInitialConfigurator' [Plugin: com.intellij]
    at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:314)
    at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:319)
    at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1739)
    at com.intellij.openapi.application.TransactionGuardImpl$2.run(TransactionGuardImpl.java:201)
    at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:808)
    at com.intellij.openapi.application.impl.ApplicationImpl.lambda$invokeLater$4(ApplicationImpl.java:328)
    at com.intellij.openapi.application.impl.FlushQueue.doRun(FlushQueue.java:84)
    at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:132)
    at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:47)
    at com.intellij.openapi.application.impl.FlushQueue$FlushNow.run(FlushQueue.java:188)
    at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
    at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:776)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:727)
    at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
    at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:746)
    at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:419)
    at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
    at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
    at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
Caused by: com.intellij.diagnostic.PluginException: Fatal error initializing 'com.android.tools.idea.AndroidInitialConfigurator' [Plugin: com.intellij]
    at com.intellij.serviceContainer.ComponentManagerImpl.handleInitComponentError$intellij_platform_serviceContainer(ComponentManagerImpl.kt:347)
    at com.intellij.serviceContainer.MyComponentAdapter.doCreateInstance(MyComponentAdapter.kt:60)
    at com.intellij.serviceContainer.BaseComponentAdapter.getInstanceUncached(BaseComponentAdapter.kt:113)
    at com.intellij.serviceContainer.BaseComponentAdapter.getInstance(BaseComponentAdapter.kt:67)
    at com.intellij.serviceContainer.BaseComponentAdapter.getInstance$default(BaseComponentAdapter.kt:60)
    at com.intellij.serviceContainer.ComponentManagerImpl.createComponents(ComponentManagerImpl.kt:260)
    at com.intellij.openapi.application.impl.ApplicationImpl.lambda$loadComponents$5(ApplicationImpl.java:352)
    at com.intellij.openapi.progress.impl.CoreProgressManager.lambda$runProcess$2(CoreProgressManager.java:170)
    at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:629)
    at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:581)
    at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:60)
    at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:157)
    at com.intellij.openapi.application.impl.ApplicationImpl.loadComponents(ApplicationImpl.java:352)
    at com.intellij.idea.ApplicationLoader$startApp$6$loadComponentInEdtFuture$1.run(ApplicationLoader.kt:193)
    at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1736)
    ... 21 more
Caused by: org.picocontainer.PicoRegistrationException: Key org.objectweb.asm.idea.plugin.view.BytecodeOutline duplicated
    at com.intellij.util.pico.DefaultPicoContainer.registerComponent(DefaultPicoContainer.java:119)
    at com.intellij.serviceContainer.ComponentManagerImpl.registerServices(ComponentManagerImpl.kt:319)
    at com.intellij.serviceContainer.ComponentManagerImpl.registerComponents(ComponentManagerImpl.kt:185)
    at com.intellij.serviceContainer.ComponentManagerImpl.registerComponents(ComponentManagerImpl.kt:157)
    at com.intellij.openapi.project.impl.DefaultProjectImpl.init(DefaultProject.java:284)
    at com.intellij.openapi.project.impl.DefaultProject$1.init(DefaultProject.java:51)
    at com.intellij.openapi.project.impl.DefaultProjectTimed.get(DefaultProjectTimed.java:34)
    at com.intellij.openapi.project.impl.DefaultProject.getDelegate(DefaultProject.java:109)
    at com.intellij.openapi.project.impl.DefaultProject.getMessageBus(DefaultProject.java:213)
    at com.intellij.openapi.project.impl.ProjectManagerImpl.getDefaultProject(ProjectManagerImpl.java:203)
    at com.android.tools.idea.sdk.IdeSdks.getAndroidSdkPath(IdeSdks.java:162)
    at com.android.tools.idea.startup.AndroidSdkInitializer.run(AndroidSdkInitializer.java:85)
    at com.android.tools.idea.AndroidInitialConfigurator.activateAndroidStudioInitializerExtensions(AndroidInitialConfigurator.java:201)
    at com.android.tools.idea.AndroidInitialConfigurator.<init>(AndroidInitialConfigurator.java:71)
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
    at com.intellij.serviceContainer.ConstructorInjectionKt.instantiateUsingPicoContainer(constructorInjection.kt:52)
    at com.intellij.serviceContainer.ComponentManagerImpl.instantiateClassWithConstructorInjection(ComponentManagerImpl.kt:664)
    at com.intellij.serviceContainer.MyComponentAdapter.doCreateInstance(MyComponentAdapter.kt:35)
    ... 34 more

-----
JRE 11.0.8+10-b944.6916264 x86_64 by N/A
/Applications/Android Studio.app/Contents/jre/jdk/Contents/Home

解决办法

  • 直接删除 AS相应版本下有问题的plugin 就可以了
  • mac下AS插件下载路径为 /Users/XXXXXXX/Library/Application Support/Google/AndroidStudio4.1,这块需要注意下.
image.png
上一篇下一篇

猜你喜欢

热点阅读