gpt4 book ai didi

未以 root 用户身份运行时出现 Android Studio 错误

转载 作者:太空宇宙 更新时间:2023-11-04 12:36:13 25 4
gpt4 key购买 nike

我正在尝试在深度操作系统上运行 Android Studio。

当我以 root (sudo/opt/.studio.sh) 身份运行 Android Studio 时,它运行良好,但当我尝试以其他用户身份运行它时,它会出现此错误并在启动画面处停止:

OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=350m; support was removed in 8.0
Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=gasp
Looking in classpath from com.intellij.util.lang.UrlClassLoader@6d5380c2 for /com/sun/jna/linux-x86-64/libjnidispatch.so
Found library resource at jar:file:/opt/android-studio/lib/jna.jar!/com/sun/jna/linux-x86-64/libjnidispatch.so
Trying /home/nilesh/.AndroidStudio2.2/system/tmp/jna5533482282299599001.tmp
Found jnidispatch at /home/nilesh/.AndroidStudio2.2/system/tmp/jna5533482282299599001.tmp
[ 7839] ERROR - llij.ide.plugins.PluginManager - tried to access method com.android.sdklib.AndroidVersion$AndroidVersionException.<init>(Ljava/lang/String;Ljava/lang/Throwable;)V from class com.android.sdklib.AndroidVersionHelper
java.lang.IllegalAccessError: tried to access method com.android.sdklib.AndroidVersion$AndroidVersionException.<init>(Ljava/lang/String;Ljava/lang/Throwable;)V from class com.android.sdklib.AndroidVersionHelper
at com.android.sdklib.AndroidVersionHelper.create(AndroidVersionHelper.java:71)
at com.android.sdklib.repository.legacy.local.LocalSdk.scanPlatforms(LocalSdk.java:908)
at com.android.sdklib.repository.legacy.local.LocalSdk.getPkgsInfos(LocalSdk.java:548)
at com.android.sdklib.repository.legacy.LegacyLocalRepoLoader.parseLegacyLocalPackage(LegacyLocalRepoLoader.java:100)
at com.android.repository.impl.manager.LocalRepoLoaderImpl.parsePackages(LocalRepoLoaderImpl.java:176)
at com.android.repository.impl.manager.LocalRepoLoaderImpl.getPackages(LocalRepoLoaderImpl.java:154)
at com.android.repository.impl.manager.RepoManagerImpl$LoadTask.run(RepoManagerImpl.java:653)
at com.android.repository.api.RepoManager$DummyProgressRunner.runSyncWithProgress(RepoManager.java:398)
at com.android.repository.impl.manager.RepoManagerImpl.load(RepoManagerImpl.java:387)
at com.android.repository.api.RepoManager.loadSynchronously(RepoManager.java:290)
at com.android.sdklib.repository.AndroidSdkHandler$RepoConfig.createRepoManager(AndroidSdkHandler.java:695)
at com.android.sdklib.repository.AndroidSdkHandler.getSdkManager(AndroidSdkHandler.java:269)
at com.android.sdklib.repository.AndroidSdkHandler.getLocalPackage(AndroidSdkHandler.java:326)
at com.android.tools.idea.welcome.wizard.FirstRunWizard.init(FirstRunWizard.java:69)
at com.android.tools.idea.welcome.wizard.FirstRunWizardHost.setupWizard(FirstRunWizardHost.java:99)
at com.android.tools.idea.welcome.wizard.FirstRunWizardHost.getWelcomePanel(FirstRunWizardHost.java:91)
at com.intellij.openapi.wm.impl.welcomeScreen.FlatWelcomeFrame.<init>(FlatWelcomeFrame.java:104)
at com.intellij.openapi.wm.impl.welcomeScreen.FlatWelcomeFrameProvider.createFrame(FlatWelcomeFrameProvider.java:29)
at com.intellij.openapi.wm.impl.welcomeScreen.WelcomeFrame.showNow(WelcomeFrame.java:171)
at com.intellij.idea.IdeaApplication$IdeStarter.main(IdeaApplication.java:340)
at com.intellij.idea.IdeaApplication.run(IdeaApplication.java:200)
at com.intellij.idea.MainImpl$1$1$1.run(MainImpl.java:52)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:756)
at java.awt.EventQueue.access$500(EventQueue.java:97)
at java.awt.EventQueue$3.run(EventQueue.java:709)
at java.awt.EventQueue$3.run(EventQueue.java:703)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:726)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:366)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
[ 7855] ERROR - llij.ide.plugins.PluginManager - Android Studio 2.2.3 Build #AI-145.3537739
[ 7855] ERROR - llij.ide.plugins.PluginManager - JDK: 1.8.0_76-release
[ 7855] ERROR - llij.ide.plugins.PluginManager - VM: OpenJDK 64-Bit Server VM
[ 7855] ERROR - llij.ide.plugins.PluginManager - Vendor: JetBrains s.r.o
[ 7855] ERROR - llij.ide.plugins.PluginManager - OS: Linux
[ 7856] ERROR - llij.ide.plugins.PluginManager - Last Action:
[ 8104] ERROR - plication.impl.ApplicationImpl - tried to access method com.android.sdklib.AndroidVersion$AndroidVersionException.<init>(Ljava/lang/String;Ljava/lang/Throwable;)V from class com.android.sdklib.AndroidVersionHelper
java.lang.IllegalAccessError: tried to access method com.android.sdklib.AndroidVersion$AndroidVersionException.<init>(Ljava/lang/String;Ljava/lang/Throwable;)V from class com.android.sdklib.AndroidVersionHelper
at com.android.sdklib.AndroidVersionHelper.create(AndroidVersionHelper.java:71)
at com.android.sdklib.repository.legacy.local.LocalSdk.scanPlatforms(LocalSdk.java:908)
at com.android.sdklib.repository.legacy.local.LocalSdk.getPkgsInfos(LocalSdk.java:548)
at com.android.sdklib.repository.legacy.LegacyLocalRepoLoader.parseLegacyLocalPackage(LegacyLocalRepoLoader.java:100)
at com.android.repository.impl.manager.LocalRepoLoaderImpl.parsePackages(LocalRepoLoaderImpl.java:176)
at com.android.repository.impl.manager.LocalRepoLoaderImpl.getPackages(LocalRepoLoaderImpl.java:154)
at com.android.repository.impl.manager.RepoManagerImpl$LoadTask.run(RepoManagerImpl.java:653)
at com.android.repository.api.RepoManager$DummyProgressRunner.runSyncWithProgress(RepoManager.java:398)
at com.android.repository.impl.manager.RepoManagerImpl.load(RepoManagerImpl.java:387)
at com.android.repository.api.RepoManager.loadSynchronously(RepoManager.java:290)
at com.android.sdklib.repository.AndroidSdkHandler$RepoConfig.createRepoManager(AndroidSdkHandler.java:695)
at com.android.sdklib.repository.AndroidSdkHandler.getSdkManager(AndroidSdkHandler.java:269)
at com.android.tools.idea.updater.SdkComponentSource.getRepoManager(SdkComponentSource.java:93)
at com.android.tools.idea.updater.SdkComponentSource.initIfNecessary(SdkComponentSource.java:64)
at com.android.tools.idea.updater.SdkComponentSource.getComponents(SdkComponentSource.java:140)
at com.android.tools.idea.updater.SdkComponentSource.getAvailableVersions(SdkComponentSource.java:121)
at com.intellij.openapi.updateSettings.impl.UpdateChecker.updateExternal(UpdateChecker.kt:355)
at com.intellij.openapi.updateSettings.impl.UpdateChecker.doUpdateAndShowResult(UpdateChecker.kt:182)
at com.intellij.openapi.updateSettings.impl.UpdateChecker.access$doUpdateAndShowResult(UpdateChecker.kt:76)
at com.intellij.openapi.updateSettings.impl.UpdateChecker$updateAndShowResult$1.run(UpdateChecker.kt:112)
at com.intellij.openapi.application.impl.ApplicationImpl$8.run(ApplicationImpl.java:369)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
[ 8119] ERROR - plication.impl.ApplicationImpl - Android Studio 2.2.3 Build #AI-145.3537739
[ 8120] ERROR - plication.impl.ApplicationImpl - JDK: 1.8.0_76-release
[ 8120] ERROR - plication.impl.ApplicationImpl - VM: OpenJDK 64-Bit Server VM
[ 8120] ERROR - plication.impl.ApplicationImpl - Vendor: JetBrains s.r.o
[ 8122] ERROR - plication.impl.ApplicationImpl - OS: Linux
[ 8122] ERROR - plication.impl.ApplicationImpl - Last Action:

我是 Android Studio 的新手,一段时间后又回到了 Linux。我不确定以 root 用户身份运行 Android Studio 是个好主意。我该怎么办?

最佳答案

它只是一个警告,说明该选项已被忽略 - 所以它不会引起任何问题

JVM 选项应位于 {IntelliJ 文件夹}/bin/idea64.exe.vmoptions(在 Windows 上 - 可能在 Linux 上类似)。您可以编辑该文件并删除 ma​​xpermsize 选项。

第二步:

设置 MaxPermSize 以防在 java 7 中运行。该参数已在 java 8 中删除,因此将被忽略。

更多信息:What does -XX:MaxPermSize do?

关于未以 root 用户身份运行时出现 Android Studio 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41695617/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com