spierce7
07/30/2021, 2:33 PM{
severity: "error",
code: null,
path: "My_App-1.0.0.dmg/My <http://App.app/Contents/app/sqlite-jdbc-3.34.1-371b212b7663f42133e45d49e82ad30.jar/org/sqlite/native/Mac/x86_64/libsqlitejdbc.jnilib|App.app/Contents/app/sqlite-jdbc-3.34.1-371b212b7663f42133e45d49e82ad30.jar/org/sqlite/native/Mac/x86_64/libsqlitejdbc.jnilib>",
message: "The binary is not signed.",
docUrl: null,
architecture: "x86_64"
},
{
severity: "error",
code: null,
path: "My_App-1.0.0.dmg/My <http://App.app/Contents/app/sqlite-jdbc-3.34.1-371b212b7663f42133e45d49e82ad30.jar/org/sqlite/native/Mac/x86_64/libsqlitejdbc.jnilib|App.app/Contents/app/sqlite-jdbc-3.34.1-371b212b7663f42133e45d49e82ad30.jar/org/sqlite/native/Mac/x86_64/libsqlitejdbc.jnilib>",
message: "The signature does not include a secure timestamp.",
docUrl: null,
architecture: "x86_64"
}
rsktash
07/31/2021, 8:44 AMjava.lang.NoSuchMethodError: No static method Blablabla
Sivan
07/31/2021, 5:10 PMv1.0.0-alpha1-rc1
throws the following error :
Could not find androidx.annotation:annotation:1.2.0.
Required by:
project : > org.jetbrains.compose.ui:ui-tooling:1.0.0-alpha1-rc1 > org.jetbrains.compose.ui:ui-tooling-desktop:1.0.0-alpha1-rc1 > org.jetbrains.compose.ui:ui-tooling-preview:1.0.0-alpha1-rc1 > org.jetbrains.compose.ui:ui-tooling-preview-desktop:1.0.0-alpha1-rc1
Am I missing something?Alexander Suraphel
07/31/2021, 5:36 PMJetBrains/compose-jb
and did desktop:package
. The size of resulting .app file is 104.5MB. I’m on macOS 11.5.1. Why is the application large for such a simple example project?atsushieno
08/01/2021, 6:22 AMrsktash
08/01/2021, 10:24 AMVictor Yakovlev
08/01/2021, 1:03 PMAlexander Suraphel
08/01/2021, 6:29 PMSteve
08/01/2021, 7:06 PMspierce7
08/02/2021, 4:50 AM/Applications
folder, it has an issue when trying to copy to the My <http://App.app/Contents/resources|App.app/Contents/resources>
dir.
java.nio.file.FileSystemException: /resources: Read-only file system
Does anyone have a recommendation of where I should be saving these resource files?atsushieno
08/02/2021, 9:31 AMe: /home/atsushi/.gradle/caches/jars-8/e51b24e2bc2b3d6212beb0e53efc315d/compose-gradle-plugin-1.0.0-alpha1-rc1.jar!/org/jetbrains/compose/desktop/DesktopExtension.class: Class 'org/jetbrains/compose/desktop/DesktopExtension' was compiled with an incompatible version of Kotlin. The binary version of its bytecode is unknown, expected version is 1.0.3Which kotlin version makes it work with compose-gradle-plugin:1.0.0-alpha1-rc1 ? I got this error with kotlin-gradle-plugin:1.5.30-M1 which I assume is the latest.
Guldana Kystaubayeva
08/02/2021, 12:17 PMMichal Harakal
08/02/2021, 1:51 PMrsktash
08/02/2021, 8:46 PMSteve
08/02/2021, 10:48 PMfun main() = Window {
val stateVertical = rememberScrollState(0F)
Row(modifier = Modifier.width(400.dp)
.horizontalScroll(stateVertical)) {
listOf(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17).forEach{
val text = "Hello, Desktop! $it"
Button(onClick = {
}) {
Text(text)
}
}
}
}
fun main() = Window {
ScrollableRow (modifier = Modifier.width(400.dp)){
listOf(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17).forEach{
val text = "Hello, Desktop! $it"
Button(onClick = {
}) {
Text(text)
}
}
}
}
rsktash
08/03/2021, 4:00 AMSam Michael
08/03/2021, 8:28 AMJoey Heck
08/03/2021, 8:42 PMval fileDialog = FileDialog(window.window)
fileDialog.isVisible = true
triggers Exception in thread "AWT-EventQueue-0" kotlinx.coroutines.CoroutinesInternalError: Fatal exception in coroutines machinery for CancellableContinuation(DispatchedContinuation[FlushCoroutineDispatcher@8e8a808, Continuation at androidx.compose.foundation.gestures.TapGestureDetectorKt.awaitChannelUpOrCancel(TapGestureDetector.kt:275)@45a19ee9]){Completed}@50fcdf16. Please read KDoc to 'handleFatalException' method and report this incident to maintainers
SrSouza
08/03/2021, 10:40 PMAlexey Glushkov
08/04/2021, 11:56 AMbuildSrc
instead of gradle includeBuild
. In my pet project I use includeBuild
and I didn’t manage to setup compose-jb with it. I’ve reproduced the error I get in my pet project with the todo example. There’re my changes: https://github.com/soniccat/compose-jb/commit/cf2dc97e8a42bc1fbd3aa678799537bd5f447921
The full error message is here https://pastebin.com/ghZLKS21
Probably I’ve messed up with gradle… would be great to hear any ideas.Alexander Kurasov[JB]
08/04/2021, 2:01 PM1.0.0-alpha2
is already available in the Maven repo.
While its API is not completely stabilized, we will strive to minimize API changes in future, focusing on stabilizing the framework on its way to beta and 1.0.
We believe that though the current version may have certain issues, it already could be used for early prototyping and PoC preparations of real applications built on Compose Multiplatform technology.
And as usual - feel free to share feedback about Compose Multiplatform, so that we could improve it. Enjoy composing!
P.S. Some details about the Release could be found here - https://blog.jetbrains.com/kotlin/2021/08/compose-multiplatform-goes-alpha/Alexander Suraphel
08/04/2021, 5:45 PMTristan B.
08/04/2021, 6:17 PMDario Valdespino
08/04/2021, 7:19 PMDominaezzz
08/04/2021, 8:56 PM1.5.10
, 1.5.20
and 1.5.21
don't seem to work.Sam Michael
08/04/2021, 9:56 PMBox {
Text(
modifier = if (isVisible.value) Modifier.drawBehind {
drawCircle(Color.Black, radius = 10f)
} else Modifier,
text = text.value,
color = Color.Gray,
fontSize = 30.sp
)
}
androidx.compose.foundation.Canvas(modifier = Modifier.fillMaxSize(), onDraw = {drawCircle(color = Color.Black, radius = 10f)})
rsktash
08/05/2021, 2:10 PMJoey Heck
08/05/2021, 3:48 PMCould not find androidx.annotation:annotation:1.2.0
Sam Michael
08/05/2021, 8:34 PMspierce7
08/05/2021, 10:35 PMval jarFile = File("<Path to downloaded jar>")
val classLoader = URLClassLoader(
arrayOf(jarFile.toURI().toURL()),
Thread.currentThread().contextClassLoader
)
val myMainClass = Class.forName("MyClass", true, classLoader)
val mainMethod = myMainClass.getDeclaredMethod("main")
mainMethod.invoke(null)
This works until the AWT loop starts and my class loader hasn’t been set on that thread so it can’t find the right class.
I’m sure there is a better way to do this. Can anyone point me in the right direction?spierce7
08/05/2021, 10:35 PMval jarFile = File("<Path to downloaded jar>")
val classLoader = URLClassLoader(
arrayOf(jarFile.toURI().toURL()),
Thread.currentThread().contextClassLoader
)
val myMainClass = Class.forName("MyClass", true, classLoader)
val mainMethod = myMainClass.getDeclaredMethod("main")
mainMethod.invoke(null)
This works until the AWT loop starts and my class loader hasn’t been set on that thread so it can’t find the right class.
I’m sure there is a better way to do this. Can anyone point me in the right direction?Thread.currentThread().contextClassLoader = classLoader
Thread.getAllStackTraces().forEach { (t, _) ->
if (t.contextClassLoader != null) {
t.contextClassLoader = classLoader
}
}
Seems to work, but I imagine new threads that spawn won’t have the class loader. There has to be a better way to do this.jim
08/06/2021, 5:22 AMcontextClassLoader
feels very sketchy to me; you shouldn't need to set the contextClassLoader
.
I'm not sure I understood the issue with the AWT loop. AWT is always going to get loaded using the parent classloader because it is part of the java.
namespace which is special cased (for security reasons?). But this shouldn't matter, as long as all your classes are loaded using your custom ClassLoader. Any class referenced by MyClass
and which is only provided by jarFile
should be loaded by your classloader.
If you can elaborate on specifically what problem you were facing with your old approach, perhaps we can help. Although it is worth noting that we are venturing into purely java territory, and there is nothing compose-specific about these questions, so you might get more visibility in a place like StackOverflow.Casey Brooks
08/09/2021, 12:21 AMspierce7
08/09/2021, 3:21 AMSetting theThis all feels super sketchy to me lolfeels very sketchy to me; you shouldn’t need to set thecontextClassLoader
contextClassLoader
Any class referenced byI actually didn’t see that happening. Based on what I was seeing, I made the assumption that the classloader on the thread that’s running the code is what is used to load the new class.and which is only provided byMyClass
should be loaded by your classloader.jarFile
Thread.currentThread().contextClassLoader = classLoader
Thread.getAllStackTraces().forEach { (t, _) ->
if (t.contextClassLoader != null) {
t.contextClassLoader = classLoader
}
}
Actually did get my jar running.
I read a blog post about how resolving all memory leaks with an approach like this is almost completely impossible though. I think taking this approach for an auto-updating app seems bad.