每当我尝试更新Android Studio时,它都会下载,然后弹出:
Internal error. Please report to http://code.google.com/p/android/issues
java.io.IOException: Cannot restart application: Can't obtain static newInstance method for class com.sun.jna.Structure
at com.intellij.util.Restarter.scheduleRestart(Restarter.java:76)
at com.intellij.idea.Main.installPatch(Main.java:184)
at com.intellij.idea.Main.main(Main.java:73)
Caused by: java.lang.UnsatisfiedLinkError: Can't obtain static newInstance method for class com.sun.jna.Structure
at com.sun.jna.Native.initIDs(Native Method)
at com.sun.jna.Native.<clinit>(Native.java:135)
at com.intellij.util.Restarter.restartOnWindows(Restarter.java:106)
at com.intellij.util.Restarter.scheduleRestart(Restarter.java:67)
... 2 more
2014-11-06 14:31:23 [Patch] Original patch exists: C:\Users\Aidan\AppData\Local\Temp\jetbrains.patch.jar.androidstudio
2014-11-06 14:31:23 [Patch] Restarted cmd: [C:\Users\Aidan\AppData\Local\Temp\VistaLauncher8848951449880199676.exe, C:\Program Files\Java\jdk1.8.0_11\jre\bin\java, -Xmx500m, -classpath, C:\Users\Aidan\AppData\Local\Temp\jetbrains.patch.jar.androidstudio_copy;C:\Users\Aidan\AppData\Local\Temp\log4j.jar.AndroidStudio_copy, -Djava.io.tmpdir=C:\Users\Aidan\AppData\Local\Temp\, -Didea.updater.log=C:\Users\Aidan\.AndroidStudioBeta\system\log, -Dswing.defaultlaf=com.sun.java.swing.plaf.windows.WindowsLookAndFeel, com.intellij.updater.Runner, install, D:\Android Studio]
2014-11-06 14:31:23 Exception: java.io.IOException: Cannot restart application: Can't obtain static newInstance method for class com.sun.jna.Structure
我总是最终从网站下载更新,删除原始版本,然后在sdk文件夹旁边提取新版本。有什么方法可以解决这个问题吗?
答案 0 :(得分:1)
我找到了解决方案
首先,您应删除2个文件夹C:\ Users \ USER_NAME \ .android,C:\ Users \ USER_NAME \ .AndroidStudio并删除C:\ Users \ USER_NAME \ AppData \ Local \ Temp
中的所有文件其次,删除并重新安装Android Studio
这种方式完美无缺
答案 1 :(得分:0)
问题解决了。排序..
将行-Djna.nosys=true
添加到/ bin文件夹中的studio.vmoptions文件修复了我的问题,我现在更新了。我从这里找到了解决方案:https://code.google.com/p/android/issues/detail?id=78656