我有一段代码--它在调试模式下工作良好--如果isMinifyEnabled=false的话,也可以生成签名的APK,但是对于生成的签名APK,当isMinifyEnabled=true生成apk文件崩溃时,会出现以下错误:
java.lang.IllegalArgumentException: Class declares 0 type parameters, but 1 were provided.
at kotlin.reflect.jvm.internal.ReflectionFactoryImpl.typeOf(ReflectionFactoryImpl.java:2
我正在尝试通过Kotlin多平台库设置Android库。
我收到错误消息:
Plugin [id: 'com.android.library'] was not found in any of the following sources:
请帮助我指出问题所在以及如何解决此问题。
我的插件设置是这样的(应该有合适的buildscript):
plugins {
id("org.jetbrains.kotlin.plugin.serialization").version("1.3.72")
id("com.android.
我正在开发一个KotlinMultiplatform应用程序,它实现了NavigationComponent、ktor到网络调用的不同库,以及存储本地数据的slqDelight。
因此,我在标记中遇到的错误如下:
Caused by: android.view.InflateException: Binary XML file line #9: Binary XML file line #9: Error inflating class androidx.fragment.app.FragmentContainerView
Caused by: android.view.I
我正在做kotlin多平台项目。我成功地在我的build.gradle中添加了几个库(ktor,coroutines,.)。我还向通用、android和ios源代码集添加了common。我的ios依赖项定义如下:
implementation "com.squareup.sqldelight:native-driver:1.4.0"
格拉德尔说一切都很好。android的代码编译:
actual fun createDb(): ToshlDatabase? {
val driver = AndroidSqliteDriver(ToshlDatabase.Schema, app
我正在开发一个SPA与Kotlin (Ktor)在后端。现在的项目结构是:
.
├── frontend/ <-- SPA frontend source project
│ ├── dist/ <-- current webpack dist
│ ├── node_modules/ <-- not to be included in the jar
│ ├── src/ <-- to be bundled by webpack
│ │ └──
我有个Kotlin Gradle项目。
如果我创建了一个.kts文件,它可以在InteliJ中运行,除非它在/src/main/kotlin文件夹中。
IDEA用红色高亮显示整个文件。Gradle抛出编译异常。例外是
...src/main/kotlin/test.kts: (3, 1): Cannot access script base class 'kotlin.script.templates.standard.ScriptTemplateWithArgs'. Check your module classpath for missing or conflicting
我试图在iOS上使用Kotlin多平台代码(使用Ktor和Kotlin )。框架是正确生成的,并且可以调用一些公开的类/方法,而不存在任何问题。但是,如果我尝试添加以下内容(例如,在中这样做)。我得到“未声明类型‘KotlinCoroutineContext的使用”(我在SharedCode.h中看到它不存在)
import Foundation
import UIKit
import SharedCode
public class CoroutineDispatcher: Kotlinx_coroutines_core_nativeCoroutineScope {
overrid
在我的gradle项目中,我得到了这个警告/错误:Unsupported Modules Detected: Compilation is not supported for following modules: io.github.dogo-Dogo, Dogo_main, Dogo_test. Unfortunately you can't have non-Gradle Java modules and Android-Gradle modules in one project.
我并不完全熟悉Gradle,我搜索了类似这样的错误,只是在Android环境中找到了这些东西,但我只
我有一个多平台库,可以用Ktor执行一些API调用(2.0.0-beta-1)
class DiscoveryServicesImpl(private val client: HttpClient) : DiscoveryServices {
override suspend fun getServers(domain: String): DAAServers {
return client.get(Servers.Domain(domain = domain)).body()
}
}
// Where client is created with speci
我试图用KTOR运行本地服务器,并用测试来覆盖它。我编写了一些代码,在编写了一些测试之后,测试成功地启动了本地服务器并通过了测试。但是,如果我试图启动本地服务器,则会出现此错误。
线程“主”io.ktor.server.engine.ApplicationEngineEnvironmentReloading中的异常:接收类java.lang.AbstractMethodError不定义或继承接口io.ktor.application.ApplicationEnvironment的已解析方法‘抽象布尔getDevelopmentMode()’的实现。
我附上下面的代码和堆栈跟踪。
server
我有个Kotlin多平台项目。我最近更新到Kotlin 1.4-M2 (我需要它来解决Ktor的一些问题)。在更新了所有所需的库、解决了所有的gradle问题并成功编译了我的Android项目之后,我现在在构建iOS应用程序时遇到了以下错误:
Task :shared:compileKotlinIosX64
e: Compilation failed: Could not find declaration for unbound symbol org.jetbrains.kotlin.ir.symbols.impl.IrSimpleFunctionPublicSymbolImpl@56f11f
我正在练习kotlin handson“交互式网站与Ktor",我没有正确的词来解释我的代码发生了什么,但我可以说:当我导航到 IDE时,显示这个错误有时是有效的
2020-11-27 16:01:59.144 [main] INFO Application - No ktor.deployment.watch patterns specified, automatic reload is not active
2020-11-27 16:02:00.677 [main] INFO Application - Responding at http://0.0.0.0:808
我正在跟踪 Ktor文档,但当我运行
./gradlew :fatjar:影子罐
在IntelliJ的终端上,就像它说的那样,我得到了以下错误:
失败:生成失败,出现异常。
哪里出了问题:根项目“com.menucabinet.ktor-菜单-橱柜”中找不到“fatjar”项目。
我一直在四处寻找,但有关这个问题的文件似乎有限.
这是我的秤:
val ktor_version: String by project
val kotlin_version: String by project
val logback_version: String by project