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

按照官方文档引入small的时候,总是会报kotlin的错误。不引入small,kotlin不会报错。 #617

Open
HsHWB opened this issue Feb 7, 2021 · 2 comments

Comments

@HsHWB
Copy link

HsHWB commented Feb 7, 2021

Project的gradle,配置了small和kotlin

buildscript {
ext.kotlin_version = "1.3.72"
ext.small_version = "1.5.0-beta2"
repositories {
google()
jcenter()
}
dependencies {
classpath "com.android.tools.build:gradle:3.4.2"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath "net.wequick.tools.build:gradle-small:$small_version"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

apply plugin: 'net.wequick.small'
small {
aarVersion = small_version
}

app的gradle配置:

api "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
api "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"

gradle跑small task的时候,异常
Execution failed for task ':small'.

Could not resolve all dependencies for configuration ':app:compile'.
Could not find org.jetbrains.kotlin:kotlin-stdlib-jre7:1.3.72.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/org/jetbrains/kotlin/kotlin-stdlib-jre7/1.3.72/kotlin-stdlib-jre7-1.3.72.pom
- https://dl.google.com/dl/android/maven2/org/jetbrains/kotlin/kotlin-stdlib-jre7/1.3.72/kotlin-stdlib-jre7-1.3.72.jar
- https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-stdlib-jre7/1.3.72/kotlin-stdlib-jre7-1.3.72.pom
- https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-stdlib-jre7/1.3.72/kotlin-stdlib-jre7-1.3.72.jar
Required by:
project :app

@newcman
Copy link

newcman commented May 28, 2021

处理了吗?我这边也报这个错

@newcman
Copy link

newcman commented May 28, 2021

buildscript {
ext.kotlin_version = "1.3.72"
repositories {
google()
jcenter()
}
dependencies {
classpath "com.android.tools.build:gradle:3.4.2"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'net.wequick.tools.build:gradle-small:1.2.0-beta3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}

configurations.all {
    resolutionStrategy {
        force "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
        force "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }
}

}
这个搞定了

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

2 participants