我刚刚使用gradle 3.4和gradle- script -kotlin 0.6将构建脚本转移到了gradle-script-kotlin。
我可以让构建脚本生成一个jar,但是清单中没有包含主类名称。根据我找到的其他帖子,我已经尝试了主类名称,在末尾使用了Kt和KT。
构建脚本如下:
/*
* Copyright 2017 SixRQ Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file excep
生成失败,类路径错误:
thufir@dur:~/NetBeansProjects/kotlinShadowJar$
thufir@dur:~/NetBeansProjects/kotlinShadowJar$ gradle clean
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'kotlinShadowJar'.
> Could not resolve all files for configurat
我在Bitbucket CI服务器上构建失败:
> Could not resolve all artifacts for configuration ':classpath'.
> Could not find aapt2-proto.jar (com.android.tools.build:aapt2-proto:0.3.1).
Searched in the following locations:
https://jcenter.bintray.com/com/android/tools/build/aapt2-proto/
我正在为Android和iOS构建一个多平台库。我的梯度文件如下所示:
plugins {
id 'org.jetbrains.kotlin.multiplatform' version '1.4.0'
}
repositories {
mavenCentral()
}
group 'com.example'
version '0.0.1'
apply plugin: 'maven-publish'
kotlin {
jvm()
// This is for iPhone sim
我正在构建一个定制的gradle.kts脚本,它将完成我们所有不同模块的maven发布到sonatype存储库,但是遇到了一个奇怪的错误。下面是我的maven-deploy.gradle.kts文件的内容:
plugins {
`maven-publish`
signing
}
publishing {
//expression 'publishing' cannot be invoked as a function.
//The function invoke() is not found
}
我可以在maven-deploy.gradle.kts文
我使用Gradle来构建我的Kotlin项目,并使用Travis CI进行持续集成。在合并上一次拉请求之后,我发现Travis CI构建失败。在我接下来看到的日志中:
FAILURE: Build failed with an exception.
> Could not resolve all files for configuration ':classpath'.
> Could not resolve org.jetbrains.kotlin:kotlin-gradle-plugin:1.2.50.
Required by:
从最近开始,在android studio中同步依赖项时,gradle开始在从Jitpack加载的存储库中抛出此错误。这是一个示例,在使缓存无效并重新加载之后,这只是我依赖列表中的第一个Jitpack库-
Could not determine artifacts for com.github.florent37:singledateandtimepicker:v1.2.0:
Skipped due to earlier error
我尝试更新库的版本,尝试首先恢复,然后更新我的gradle版本和gradle构建工具。我已经更新了android studio和android构建工具。使缓存无
我无法在android模拟器中运行我的应用程序。它以前是工作的,但有什么东西把它弄坏了。 错误消息: A problem occurred evaluating root project 'android'.
> Could not find method implementation() for arguments [com.google.android.material:material:1.1.0] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDepende
由于以下错误,无法使用Android 4.2构建新项目:
A problem occurred configuring root project 'My Application'.
> Could not resolve all artifacts for configuration ':classpath'.
> Could not find org.jetbrains.kotlin:kotlin-gradle-plugin:1.5.0-release-764.
Searched in the following locations