Skip to content

Start failed with latest Android Studio #1353

Closed
@Undin

Description

@Undin

Describe the bug
I can't run Android Studio AI-2022.3.1.10 because it shows me Start Failed error message
Screenshot 2023-03-28 at 16 38 36

Some tests fail as well.

I assume it's because of problem during loading dynamic jna library

Stacktrace
[    439]   WARN - #c.i.j.JnaLoader - Unable to load JNA library (os=Mac OS X 12.5.1, jna.boot.library.path=/Users/Arseniy.Pendryak/.gradle/caches/modules-2/files-2.1/com.google.android.studio/android-studio/2022.3.1.10/15b5e33d4e4439ba810fd33343c24de9586f1424/android-studio-2022.3.1.10/Contents/lib/jna/amd64)
java.lang.UnsatisfiedLinkError: Unable to locate JNA native support library
	at com.sun.jna.Native.loadNativeDispatchLibrary(Native.java:1018)
	at com.sun.jna.Native.<clinit>(Native.java:221)
	at com.intellij.jna.JnaLoader.load(JnaLoader.java:19)
	at com.intellij.jna.JnaLoader.isLoaded(JnaLoader.java:35)
	at com.intellij.openapi.util.io.FileSystemUtil.computeMediator(FileSystemUtil.java:58)
	at com.intellij.openapi.util.io.FileSystemUtil.<clinit>(FileSystemUtil.java:53)
	at com.intellij.openapi.vfs.newvfs.persistent.FSRecords.calculateVersion(FSRecords.java:100)
	at com.intellij.openapi.vfs.newvfs.persistent.FSRecords.connect(FSRecords.java:166)
	at com.intellij.openapi.vfs.newvfs.persistent.PersistentFSImpl.doConnect(PersistentFSImpl.java:128)
	at com.intellij.openapi.vfs.newvfs.persistent.PersistentFSImpl.connect(PersistentFSImpl.java:107)
	at com.intellij.openapi.vfs.newvfs.persistent.PersistentFSImpl.<init>(PersistentFSImpl.java:99)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499)
	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:480)
	at com.intellij.serviceContainer.ConstructorInjectionKt.instantiateUsingPicoContainer(constructorInjection.kt:49)
	at com.intellij.serviceContainer.ComponentManagerImpl.instantiateClassWithConstructorInjection(ComponentManagerImpl.kt:996)
	at com.intellij.serviceContainer.ServiceComponentAdapter.createAndInitialize(ServiceComponentAdapter.kt:43)
	at com.intellij.serviceContainer.ServiceComponentAdapter.doCreateInstance(ServiceComponentAdapter.kt:39)
	at com.intellij.serviceContainer.BaseComponentAdapter.doCreateInstance(BaseComponentAdapter.kt:154)
	at com.intellij.serviceContainer.BaseComponentAdapter.createInstance$lambda$1(BaseComponentAdapter.kt:133)
	at com.intellij.openapi.progress.Cancellation.computeInNonCancelableSection(Cancellation.java:99)
	at com.intellij.serviceContainer.BaseComponentAdapter.createInstance(BaseComponentAdapter.kt:132)
	at com.intellij.serviceContainer.BaseComponentAdapter.access$createInstance(BaseComponentAdapter.kt:19)
	at com.intellij.serviceContainer.BaseComponentAdapter$getInstanceAsync$2.invokeSuspend(BaseComponentAdapter.kt:181)
	at com.intellij.serviceContainer.BaseComponentAdapter$getInstanceAsync$2.invoke(BaseComponentAdapter.kt)
	at com.intellij.serviceContainer.BaseComponentAdapter$getInstanceAsync$2.invoke(BaseComponentAdapter.kt)
	at kotlinx.coroutines.intrinsics.UndispatchedKt.startUndispatchedOrReturn(Undispatched.kt:89)
	at kotlinx.coroutines.BuildersKt__Builders_commonKt.withContext(Builders.common.kt:169)
	at kotlinx.coroutines.BuildersKt.withContext(Unknown Source)
	at com.intellij.serviceContainer.BaseComponentAdapter.getInstanceAsync(BaseComponentAdapter.kt:176)
	at com.intellij.serviceContainer.ComponentManagerImpl.getServiceAsyncIfDefined(ComponentManagerImpl.kt:645)
	at com.intellij.serviceContainer.ComponentManagerImpl.getServiceAsync(ComponentManagerImpl.kt:636)
	at com.intellij.idea.ApplicationLoader$preloadCriticalServices$1.invokeSuspend(ApplicationLoader.kt:192)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
	at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
	at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)

To Reproduce
Try to run test in Edu-Android module using https://github.com/JetBrains/educational-plugin/tree/54cf5edaca499a4c6f7748eeb52c76f10a0b4198

Expected behavior
AS launches without error and tests don't fail with java.lang.UnsatisfiedLinkError: Unable to locate JNA native support library error

Environment:

  • OS: macOS 12.5.1
  • Gradle IntelliJ Plugin Version: 1.10.1 and 1.13.2
  • Gradle Version: 7.6

Additional context
Symptoms are the same with #1163

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions