最开始安装的是3.1.2版本的Androidstudio,然后下载了android-studio-2020.3.1.25-windows.exe?
安装时选择卸载以前的版本,安装成功后,Androidstudio竟然怎么都打不开了,程序直接运行闪退。
尝试了:
1、重启电脑;
2、清理Androidstudio生成的缓存,重启电脑;
2、再次卸载Androidstudio,再次清理Androidstudio生成的缓存,重启电脑,重新安装;
清理Androidstudio生成的缓存:
1、C:\Users\个人文件夹\AppData\Local\Google下的AndroidStudio2020.3文件夹(这是我安装的版本),把它删除掉;
2、C:\Users\个人文件夹\AppData\Roaming\Google下的AndroidStudio2020.3文件夹(这是我安装的版本),把它删除掉;
仍然无法打开Androidstudio,最后在?C:\Users\个人文件夹\AppData\Local\Google\AndroidStudio2020.3\log下的idea.log文件查看错误日志:
以下是截取的部分错误日志,错误重点:
idea.config.path=AppData\Roaming\Google\AndroidStudio2020.3
idea.system.path=AppData\Local\Google\AndroidStudio2020.3
idea.plugins.path=AppData\Roaming\Google\AndroidStudio2020.3\plugins
idea.log.path=AppData\Local\Google\AndroidStudio2020.3\log
STDERR -
TDERR - Start Failed
STDERR - Internal error. Please refer to https://code.google.com/p/android/issues
STDERR -
STDERR - com.intellij.ide.plugins.StartupAbortedException: UI initialization failed
STDERR - at com.intellij.idea.StartupUtil.lambda$prepareApp$3(StartupUtil.java:194)
STDERR - at java.base/java.util.concurrent.CompletableFuture.uniExceptionally(CompletableFuture.java:986)
STDERR - at java.base/java.util.concurrent.CompletableFuture$UniExceptionally.tryFire(CompletableFuture.java:970)
STDERR - at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:506)
STDERR - at java.base/java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:2088)
STDERR - at com.intellij.idea.StartupUtil.lambda$scheduleInitUi$9(StartupUtil.java:375)
STDERR - at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
STDERR - at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
STDERR - at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:668)
STDERR - at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:665)
STDERR - at java.base/java.security.AccessController.doPrivileged(Native Method)
STDERR - at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:665)
STDERR - at java.base/java.lang.Thread.run(Thread.java:834)
STDERR - Caused by: java.util.concurrent.CompletionException: java.lang.UnsatisfiedLinkError: Desktop\Android Studio\Android Studio\jre\bin\awt.dll: Can't find dependent libraries
STDERR - at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:331)
STDERR - at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:346)
STDERR - at java.base/java.util.concurrent.CompletableFuture$BiRelay.tryFire(CompletableFuture.java:1423)
STDERR - ... 10 more
STDERR - Caused by: java.lang.UnsatisfiedLinkError: Desktop\Android Studio\Android Studio\jre\bin\awt.dll: Can't find dependent libraries
STDERR - at java.base/java.lang.ClassLoader$NativeLibrary.load0(Native Method)
STDERR - at java.base/java.lang.ClassLoader$NativeLibrary.load(ClassLoader.java:2442)
STDERR - at java.base/java.lang.ClassLoader$NativeLibrary.loadLibrary(ClassLoader.java:2498)
STDERR - at java.base/java.lang.ClassLoader.loadLibrary0(ClassLoader.java:2694)
STDERR - at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2648)
STDERR - at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:830)
STDERR - at java.base/java.lang.System.loadLibrary(System.java:1873)
STDERR - at java.desktop/java.awt.Toolkit$3.run(Toolkit.java:1395)
STDERR - at java.desktop/java.awt.Toolkit$3.run(Toolkit.java:1393)
STDERR - at java.base/java.security.AccessController.doPrivileged(Native Method)
STDERR - at java.desktop/java.awt.Toolkit.loadLibraries(Toolkit.java:1392)
STDERR - at java.desktop/java.awt.Toolkit.<clinit>(Toolkit.java:1430)
STDERR - at java.desktop/java.awt.EventQueue.invokeLater(EventQueue.java:1318)
STDERR - at com.intellij.idea.StartupUtil.lambda$scheduleInitUi$9(StartupUtil.java:326)
STDERR - ... 7 more
STDERR -
STDERR - -----
STDERR - Your JRE: 11.0.10+0-b96-7249189 amd64 (Oracle Corporation)
STDERR - Desktop\Android Studio\Android Studio\jre
STDERR -
STDERR - Also, a UI exception occurred on an attempt to show the above message
STDERR - java.lang.NoClassDefFoundError: Could not initialize class java.awt.Toolkit
STDERR - at java.desktop/java.awt.Component.<clinit>(Component.java:626)
STDERR - at com.intellij.idea.Main.showMessage(Main.java:317)
STDERR - at com.intellij.idea.Main.showMessage(Main.java:270)
STDERR - at com.intellij.ide.plugins.StartupAbortedException.logAndExit(StartupAbortedException.java:86)
STDERR - at com.intellij.ide.plugins.StartupAbortedException.processException(StartupAbortedException.java:34)
STDERR - at com.intellij.idea.StartupUtil.lambda$prepareApp$3(StartupUtil.java:194)
STDERR - at java.base/java.util.concurrent.CompletableFuture.uniExceptionally(CompletableFuture.java:986)
STDERR - at java.base/java.util.concurrent.CompletableFuture$UniExceptionally.tryFire(CompletableFuture.java:970)
STDERR - at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:506)
STDERR - at java.base/java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:2088)
STDERR - at com.intellij.idea.StartupUtil.lambda$scheduleInitUi$9(StartupUtil.java:375)
STDERR - at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
STDERR - at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
STDERR - at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:668)
STDERR - at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1$1.run(Executors.java:665)
STDERR - at java.base/java.security.AccessController.doPrivileged(
Native Method)
STDERR - at java.base/java.util.concurrent.Executors$PrivilegedThreadFactory$1.run(Executors.java:665)
STDERR - at java.base/java.lang.Thread.run(Thread.java:834)
打开了错误日志中提到的??https://code.google.com/p/android/issues??在里面搜索错误信息,找到了我这个问题对应的解决方案,需要下载安装?VC_redist.x64.exe 就可以解决。按着提示下载安装后,Androidstudio终于能正常打开程序了,nice!
|