Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Couldn't run desktop template #69

Closed
uburoiubu opened this issue Nov 6, 2020 · 5 comments
Closed

Couldn't run desktop template #69

uburoiubu opened this issue Nov 6, 2020 · 5 comments

Comments

@uburoiubu
Copy link

uburoiubu commented Nov 6, 2020

when running desktop-template, the following exception is thrown:

Exception in thread "AWT-EventQueue-0" java.lang.UnsupportedClassVersionError: org/jetbrains/skiko/Library has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:757)
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:468)
	at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:419)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:352)
	at androidx.compose.desktop.ComposeInit.<clinit>(ComposeInit.kt:45)
	at androidx.compose.desktop.ComposeInitKt.initCompose(ComposeInit.kt:40)
	at androidx.compose.desktop.ComposeWindow.<clinit>(ComposeWindow.kt:39)
	at androidx.compose.desktop.AppWindow.<init>(AppWindow.kt:77)
	at androidx.compose.desktop.AppWindow.<init>(AppWindow.kt)
	at androidx.compose.desktop.AppWindowKt$Window$1.run(AppWindow.kt:53)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:764)
	at java.awt.EventQueue.access$500(EventQueue.java:98)
	at java.awt.EventQueue$3.run(EventQueue.java:715)
	at java.awt.EventQueue$3.run(EventQueue.java:709)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:734)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
	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)

run in Android Studio.

@olonho
Copy link
Contributor

olonho commented Nov 6, 2020

Set Gradle JDK to version 11 or later.

@olonho olonho closed this as completed Nov 6, 2020
@uburoiubu
Copy link
Author

uburoiubu commented Nov 7, 2020

@olonho, still have the problem setting up the project (spent several hours trying different JDK):

dyld: lazy symbol binding failed: Symbol not found: _objc_opt_new
  Referenced from: /Users/eugene/.skiko/b9408918342fa3c0511232e1869d6b3885a57b45a57800586f357a2461785a4e/libskiko.dylib (which was built for Mac OS X 10.15)
  Expected in: /usr/lib/libobjc.A.dylib

dyld: Symbol not found: _objc_opt_new
  Referenced from: /Users/eugene/.skiko/b9408918342fa3c0511232e1869d6b3885a57b45a57800586f357a2461785a4e/libskiko.dylib (which was built for Mac OS X 10.15)
  Expected in: /usr/lib/libobjc.A.dylib


FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':run'.
> Process 'command '/Users/eugene/Library/Java/JavaVirtualMachines/openjdk-15.0.1/Contents/Home/bin/java'' finished with non-zero exit value 134

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 16s

MacOs 10.14.6

@song314
Copy link

song314 commented Nov 11, 2020

@olonho, still have the problem setting up the project (spent several hours trying different JDK):

dyld: lazy symbol binding failed: Symbol not found: _objc_opt_new
  Referenced from: /Users/eugene/.skiko/b9408918342fa3c0511232e1869d6b3885a57b45a57800586f357a2461785a4e/libskiko.dylib (which was built for Mac OS X 10.15)
  Expected in: /usr/lib/libobjc.A.dylib

dyld: Symbol not found: _objc_opt_new
  Referenced from: /Users/eugene/.skiko/b9408918342fa3c0511232e1869d6b3885a57b45a57800586f357a2461785a4e/libskiko.dylib (which was built for Mac OS X 10.15)
  Expected in: /usr/lib/libobjc.A.dylib


FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':run'.
> Process 'command '/Users/eugene/Library/Java/JavaVirtualMachines/openjdk-15.0.1/Contents/Home/bin/java'' finished with non-zero exit value 134

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 16s

MacOs 10.14.6

so do I

@abetar0
Copy link

abetar0 commented Nov 12, 2020

I met the same error, and it seems this template doesn't work on macOS 10.14.6.

ref: #76

@tz182736
Copy link

tz182736 commented May 3, 2021

I still met the same error on windows 10 (64bit)
openjdk 16.0.1
gradle-7.0-bin
kotlin("jvm") version "1.4.32"
id("org.jetbrains.compose") version "0.4.0-build185"

But change kotlin ("jvm") will solved the problem.
kotlin("jvm") version "1.4.10"
// UPDATE_COMPOSE_VERSION_MARKER
id("org.jetbrains.compose") version "0.1.0-build113"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants