如何解决 Android Studio 4 启动崩溃问题?

huangapple go评论81阅读模式
英文:

How to fix crash on launch in Android Studio 4?

问题

这是发生在我导入一个原生 OpenCV 项目(https://github.com/leadrien/opencv_native_androidstudio/blob/master/app/src/main/cpp/native-lib.cpp)后安装了一些与 IntelliJ 相关的插件之后发生的。启动时出现以下错误:

内部错误。请参阅 https://code.google.com/p/android/issues

java.lang.ExceptionInInitializerError
    at com.a.a.b.a.p.a(p.java:182)
    at com.a.a.b.b.ar.a(ar.java:348)
    at com.a.a.b.b.ar.a(ar.java:172)
    at com.a.a.b.b.ar.a(ar.java:71)
    at com.intellij.idea.MainImpl.start(MainImpl.java:19)
    at com.intellij.idea.StartupUtil.lambda$startApp$5(StartupUtil.java:248)
    at com.intellij.util.ui.EdtInvocationManager.executeWithCustomManager(EdtInvocationManager.java:73)
    at com.intellij.idea.StartupUtil.startApp(StartupUtil.java:243)
    at com.intellij.idea.StartupUtil.prepareApp(StartupUtil.java:214)
    at com.intellij.ide.plugins.MainRunner.lambda$start$0(MainRunner.java:45)
    at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NullPointerException
    at com.intellij.ui.scale.JBUIScale.lambda$static$0(JBUIScale.java:72)
    at com.intellij.openapi.util.AtomicNotNullLazyValue$1.compute(AtomicNotNullLazyValue.java:59)
    at com.intellij.openapi.util.AtomicNotNullLazyValue.getValue(AtomicNotNullLazyValue.java:37)
    at com.intellij.ui.scale.JBUIScale.lambda$static$1(JBUIScale.java:152)
    at com.intellij.util.LazyInitializer$MutableNotNullValue.initialize(LazyInitializer.java:113)
    at com.intellij.util.LazyInitializer$NullableValue.get(LazyInitializer.java:41)
    at com.intellij.util.LazyInitializer$MutableNotNullValue.get(LazyInitializer.java:102)
    at com.intellij.ui.scale.JBUIScale.lambda$static$2(JBUIScale.java:170)
    at com.intellij.util.LazyInitializer$MutableNotNullValue.initialize(LazyInitializer.java:113)
    at com.intellij.util.LazyInitializer$NullableValue.get(LazyInitializer.java:41)
    at com.intellij.util.LazyInitializer$MutableNotNullValue.get(LazyInitializer.java:102)
    at com.intellij.ui.scale.JBUIScale.scale(JBUIScale.java:294)
    at com.intellij.util.ui.JBInsets.create(JBInsets.java:41)
    at com.intellij.util.ui.UIUtil.<clinit>(UIUtil.java:457)
    ... 11 more

-----
JRE 1.8.0_242-release-1644-b3-6222593 amd64 由 JetBrains s.r.o 提供
/opt/android-studio/jre/jre
英文:

It happened when after I installed some intellij related plugins after importing a native opencv project https://github.com/leadrien/opencv_native_androidstudio/blob/master/app/src/main/cpp/native-lib.cpp.
On startup it throws in this error.

Internal error. Please refer to https://code.google.com/p/android/issues

java.lang.ExceptionInInitializerError
    at com.a.a.b.a.p.a(p.java:182)
    at com.a.a.b.b.ar.a(ar.java:348)
    at com.a.a.b.b.ar.a(ar.java:172)
    at com.a.a.b.b.ar.a(ar.java:71)
    at com.intellij.idea.MainImpl.start(MainImpl.java:19)
    at com.intellij.idea.StartupUtil.lambda$startApp$5(StartupUtil.java:248)
    at com.intellij.util.ui.EdtInvocationManager.executeWithCustomManager(EdtInvocationManager.java:73)
    at com.intellij.idea.StartupUtil.startApp(StartupUtil.java:243)
    at com.intellij.idea.StartupUtil.prepareApp(StartupUtil.java:214)
    at com.intellij.ide.plugins.MainRunner.lambda$start$0(MainRunner.java:45)
    at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NullPointerException
    at com.intellij.ui.scale.JBUIScale.lambda$static$0(JBUIScale.java:72)
    at com.intellij.openapi.util.AtomicNotNullLazyValue$1.compute(AtomicNotNullLazyValue.java:59)
    at com.intellij.openapi.util.AtomicNotNullLazyValue.getValue(AtomicNotNullLazyValue.java:37)
    at com.intellij.ui.scale.JBUIScale.lambda$static$1(JBUIScale.java:152)
    at com.intellij.util.LazyInitializer$MutableNotNullValue.initialize(LazyInitializer.java:113)
    at com.intellij.util.LazyInitializer$NullableValue.get(LazyInitializer.java:41)
    at com.intellij.util.LazyInitializer$MutableNotNullValue.get(LazyInitializer.java:102)
    at com.intellij.ui.scale.JBUIScale.lambda$static$2(JBUIScale.java:170)
    at com.intellij.util.LazyInitializer$MutableNotNullValue.initialize(LazyInitializer.java:113)
    at com.intellij.util.LazyInitializer$NullableValue.get(LazyInitializer.java:41)
    at com.intellij.util.LazyInitializer$MutableNotNullValue.get(LazyInitializer.java:102)
    at com.intellij.ui.scale.JBUIScale.scale(JBUIScale.java:294)
    at com.intellij.util.ui.JBInsets.create(JBInsets.java:41)
    at com.intellij.util.ui.UIUtil.<clinit>(UIUtil.java:457)
    ... 11 more

-----
JRE 1.8.0_242-release-1644-b3-6222593 amd64 by JetBrains s.r.o
/opt/android-studio/jre/jre

答案1

得分: 5

我删除了~/.AndroidStudio4.0/config/plugins目录下的三个插件来解决这个问题:

  • idea-multimarkdown
  • markdown
  • Gauge-Java-Intellij
英文:

I solved this by delete three plugins under ~/.AndroidStudio4.0/config/plugins

idea-multimarkdown
markdown
Gauge-Java-Intellij

答案2

得分: 1

我通过删除 ~/.AndroidStudio4.0/config/plugins/ 中的最新插件来解决了这个问题,其中 Gauge-Java-Intellij 和 Markdown 对我的情况造成了问题。

英文:

I solved it by deleting the latest plugins in ~/.AndroidStudio4.0/config/plugins/ Gauge-Java-Intellij and Markdown were causing issues in my case.

答案3

得分: 1

在我的情况下,与Markdown插件有问题。

我通过将最新的插件保留在*~/.AndroidStudio4.0/config/plugins/,并移除.../android-studio-4.0.1/plugins/Kotlin/lib/markdown-0.1.25.jar*中的旧版本来解决了这个问题。

英文:

In my case, had problems with the markdown plugin.

I solved keeping the latest plugin in ~/.AndroidStudio4.0/config/plugins/ and removing the old version in .../android-studio-4.0.1/plugins/Kotlin/lib/markdown-0.1.25.jar.

huangapple
  • 本文由 发表于 2020年8月17日 10:06:04
  • 转载请务必保留本文链接:https://go.coder-hub.com/63443687.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定