
[英]Kotlin retry scheduled cron task if failed
赏金将在 7 天后到期。 此问题的答案有资格获得+100声望赏金。 William Ross正在寻找一个规范的答案: 我正在寻找使用 Spring Boot/Kotlin 和 Kube.netes CronJobs 来安排作业之间的权衡。 我需要最大的可靠性,并想评估我是否可以单独使用 Spri ...
[英]Kotlin retry scheduled cron task if failed
赏金将在 7 天后到期。 此问题的答案有资格获得+100声望赏金。 William Ross正在寻找一个规范的答案: 我正在寻找使用 Spring Boot/Kotlin 和 Kube.netes CronJobs 来安排作业之间的权衡。 我需要最大的可靠性,并想评估我是否可以单独使用 Spri ...
[英]Flutter's EventChannel not sending data to dart side
赏金将在 6 天后到期。 此问题的答案有资格获得+100声望赏金。 BraveEvidence想让更多人关注这个问题。 我试图在 android 的共享表中显示我的应用程序,我能够成功地做到这一点,但我无法使用EventChannel从本机端向 dart 发送数据。 我已将我的 MainActi ...
[英]How can I restrict the type of a parameter in Android Jetpack Compose with Kotlin?
赏金将在 6 天后到期。 此问题的答案有资格获得+50声望赏金。 HelloCW正在寻找来自可靠来源的答案。 我可以使用代码 A 显示编辑框对话框。 事实上,参数editTextConten需要像var editContent by remember { mutableStateOf("Hell ...
[英]How to Plot Line Chart in reverse direction ie. starting from right to left direction in Android using MPAndroidChart library?
您好我正在使用这个库https://github.com/PhilJay/MPAndroidChart并尝试绘制从端点到起点的折线图,即从右到左的方向,我遵循库文档并尝试实现以下自定义 class 代码: 但是上面的代码完全从正确的方向开始停止 animation lineChart.animat ...
[英]Draw an oval shape in Jetpack Compose Koltin
我想创建或绘制椭圆形。 我做了如下 我正在使用 jetpack compose kotlin,当我使用上面的 class 时,出现如下错误: 我怎样才能解决这个问题? ...
[英]Glitch with CollapsingToolbarLayout when popping up a fragment
赏金将在 23 小时后到期。 此问题的答案有资格获得+100声望赏金。 P1x想让更多人关注这个问题。 我有一个带有 CollapsingToolbarLayout 的片段 A,其中包含滚动页面时折叠的视图。 在页面的末尾,一个按钮导航到另一个片段 B。 当我按回片段 B 时,片段 B 从导航堆 ...
[英]Can I use “@ApplicationContext private val appContext: Context” as DI for a class that will be invoked by a Service() in Android Studio?
赏金将在 4 天后到期。 此问题的答案有资格获得+50声望赏金。 HelloCW正在寻找来自可靠来源的答案。 我在我的 Android Studio 项目中使用 Hilt 作为 DI。 ServiceTranslate是一个Service class,它的生命周期比应用本身更长。 Servi ...
[英]CollapsingToolbar in Compose with Button Sticky
我正在尝试在Compose中实现 CollapsingToolbar,但我通过 inte.net 找到的示例无法满足我的需求。 我曾经使用 xml 并且相同的布局是: 我已经尝试了很多东西,但困难的是拥有FloatingButton (可以是任何其他视图,而不是特别是FAB )。 演示: 我做的 ...
[英]Kotlin - encode json of properties using function from extended class
我尝试使用扩展 class 中的 function 来 Json.encodeToString: 孩子 class 家长 class 使用 这得到“{}”。 我认为它需要父 class 的属性。 编辑: 我需要在 Serializable class 中进行注释,因为我需要将不同的对象放到一个 fu ...
[英]BuildConfig could not resolve after upgrading Android Studio to Flamingo | 2022.2.1 Patch 1
我的项目在设备上成功运行,但是当我升级我的项目时, BuildConfig文件没有解析 我已经使Invalidate Caches...并Sync Project with gradle files ,但BuildCongfig文件无法解析。 我创建了一个新项目,但在该项目中存在同样的问题。 ...
[英]How can I add twitter v2 Kotlin library to my maven java code?
我正在使用 twitter4j 访问 twitter API 的 v1。正如你们中的一些人所知,v1 将在 2023 年 4 月 29 日被删除/弃用。 对于 v2 twitter API,我发现我需要将 v2 twitter4j 包装器添加到我的项目中才能使用 v2 API。 https:// ...
[英]Android Studio FAILURE: Build failed with an exception. PermittedSubclasses requires ASM9
android studio 从电鳗降级到长颈鹿后,无法建工程。 Android Studio 抛出异常FAILURE: Build failed with an exception. PermittedSubclasses requires ASM9 FAILURE: Build faile ...
[英]Build Error: 'kspDebugKotlin' task (current target is 17)
任务“:app:kspDebugKotlin”执行失败。 无法使用ksp构建 “compileDebugJavaWithJavac”任务(当前目标为 1.8)和“kspDebugKotlin”任务(当前目标为 17)jvm 目标兼容性应设置为相同的 Java 版本。 ...
[英]Kotlin Mockk : Unable to mock a list correctly
我正在尝试验证列表中的.shuffled()是否已调用,但由于列表中先前的.take(6)调用而在运行时出现错误,我看不到解决此问题的方法。 这是一些出现相同错误的代码: 在第 4 行,我收到以下错误: 尝试通过直接验证choiceList.take(6).shuffled()并将两个 tmp va ...
[英]Memory Leaking Android
你们有什么建议会导致我从 Leak Canary 得到的这个 memory 泄漏吗? 以下是我从报告中得到的描述。 重现的步骤是,在设置菜单中,点击将执行主题更改的开关,此操作后,泄漏发生。 下面我将提供来自 SettingsFragmentClass 的代码片段。 任何帮助都会受到欢迎。 调用此 ...
[英]What are the differences between the maxOf() and max() methods in Kotlin?
我对这些方法的不同用例感到有些困惑。 我可以看到一个在Kotlin.math中,一个在Kotlin.comparisons中,所以我猜这意味着maxOf()可以与用户定义类的对象一起使用,但这是唯一的区别因素吗? ...
[英]Why is my nested class not accessible? (Kotlin)
我试图遵循嵌套类文档中的示例: Kotlin 文档 - 嵌套类和内部类所以我尝试了:fun main(){ var tester = Test() println(tester.x) // 42 tester.Foo().bar() // compiler error - ...
[英]How to compare two objects in a Pair and return the max one
我有一个类型为Pair<Object1, Object2>的 object,现在我试图返回 object,其中比较值较低。 我在 kotlin 中看到我们有以下 function 这个应该对我有用,因为我需要查看两个对象中哪一个具有最小值并返回 object 所以我希望将 object ...
[英]How do I connect to a Spring STOMP websocket using a native Android client?
我正在尝试使用 Android Studio 和 Spring Boot with kotlin 做一个小型聊天室练习项目。我的问题是我已经尝试使用许多不同的库将应用程序连接到 websocket:例如:OkHttp、Scarlet、Ktor 但到目前为止我还没有找到解决办法。 对于 websoc ...
[英]Kotlin: zip two lists with index
有没有办法在Kotlin中的两个列表 zip 中知道转换 lambda 中的当前索引? 是这样的吗? ...