我的settings.gradle.kts:
pluginManagement {
repositories {
google {
content {
includeGroupByRegex("com\.android.")
includeGroupByRegex("com\.google.")
includeGroupByRegex("androidx.*")
}
}
gradlePluginPortal()
google()
mavenCentral()
maven { url = uri("https://maven.aliyun.com/repository/google") }
maven { url = uri("https://maven.aliyun.com/repository/public") }
maven { url = uri("https://developer.hihonor.com/repo") }
maven { url = uri("https://developer.huawei.com/repo") }
maven { url = uri("https://repo1.maven.org/maven2/") }
maven { url = uri("https://jitpack.io") }
}
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
maven { url = uri("https://maven.aliyun.com/repository/google") }
maven { url = uri("https://maven.aliyun.com/repository/public") }
maven { url = uri("https://developer.hihonor.com/repo") }
maven { url = uri("https://developer.huawei.com/repo") }
maven { url = uri("https://repo1.maven.org/maven2/") }
maven { url = uri("https://jitpack.io") }
gradlePluginPortal()
google()
mavenCentral()
mavenLocal()
}
}
rootProject.name = "My Application"
include(":app")
build.gradle.kts:
buildscript {
dependencies {
//腾讯渠道打包https://github.com/Tencent/VasDolly
classpath(libs.plugins.tencent.vasdolly)
}
}
plugins {
alias(libs.plugins.android.application) apply false
alias(libs.plugins.kotlin.android) apply false
alias(libs.plugins.kotlin.compose) apply false
}
libs,version:#腾讯渠道包 https://github.com/Tencent/VasDolly
tencent-vasdolly-helper = { module = "com.tencent.vasdolly:helper", version.ref = "tencentVasDolly" }
tencent-vasdolly-plugin = { module = "com.tencent.vasdolly:plugin", version.ref = "tencentVasDolly" }
[plugins]
android-application = { id = "com.android.application", version.ref = "agp" }
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
kotlin-compose = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
tencent-vasdolly = { id = "com.tencent.vasdolly", version.ref = "tencentVasDolly" }
app的build.gradle.kts:
plugins {
alias(libs.plugins.android.application)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.kotlin.compose)
id(libs.plugins.tencent.vasdolly.get().pluginId)
}
dependencies {
implementation(libs.tencent.vasdolly.helper)
}
按照你给的配置了 我啥还是报错:
A problem occurred configuring root project 'My Application'.
Could not resolve all dependencies for configuration ':classpath'.
Cannot convert the provided notation to an object of type Dependency: com.tencent.vasdolly:3.0.6.
The following types/formats are supported:
- String or CharSequence values, for example 'org.gradle:gradle-core:1.0'.
- Maps, for example [group: 'org.gradle', name: 'gradle-core', version: '1.0'].
- FileCollections, for example files('some.jar', 'someOther.jar').
- Projects, for example project(':some:project:path').
- ClassPathNotation, for example gradleApi().
Run with --info or --debug option to get more log output.
Run with --scan to get full insights.
Get more help at https://help.gradle.org.
我的settings.gradle.kts:
pluginManagement {
repositories {
google {
content {
includeGroupByRegex("com\.android.")
includeGroupByRegex("com\.google.")
includeGroupByRegex("androidx.*")
}
}
gradlePluginPortal()
google()
mavenCentral()
maven { url = uri("https://maven.aliyun.com/repository/google") }
maven { url = uri("https://maven.aliyun.com/repository/public") }
maven { url = uri("https://developer.hihonor.com/repo") }
maven { url = uri("https://developer.huawei.com/repo") }
maven { url = uri("https://repo1.maven.org/maven2/") }
maven { url = uri("https://jitpack.io") }
}
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
maven { url = uri("https://maven.aliyun.com/repository/google") }
maven { url = uri("https://maven.aliyun.com/repository/public") }
maven { url = uri("https://developer.hihonor.com/repo") }
maven { url = uri("https://developer.huawei.com/repo") }
maven { url = uri("https://repo1.maven.org/maven2/") }
maven { url = uri("https://jitpack.io") }
gradlePluginPortal()
google()
mavenCentral()
mavenLocal()
}
}
rootProject.name = "My Application"
include(":app")
build.gradle.kts:
buildscript {
dependencies {
//腾讯渠道打包https://github.com/Tencent/VasDolly
classpath(libs.plugins.tencent.vasdolly)
}
}
plugins {
alias(libs.plugins.android.application) apply false
alias(libs.plugins.kotlin.android) apply false
alias(libs.plugins.kotlin.compose) apply false
}
libs,version:#腾讯渠道包 https://github.com/Tencent/VasDolly
tencent-vasdolly-helper = { module = "com.tencent.vasdolly:helper", version.ref = "tencentVasDolly" }
tencent-vasdolly-plugin = { module = "com.tencent.vasdolly:plugin", version.ref = "tencentVasDolly" }
[plugins]
android-application = { id = "com.android.application", version.ref = "agp" }
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
kotlin-compose = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
tencent-vasdolly = { id = "com.tencent.vasdolly", version.ref = "tencentVasDolly" }
app的build.gradle.kts:
plugins {
alias(libs.plugins.android.application)
alias(libs.plugins.kotlin.android)
alias(libs.plugins.kotlin.compose)
id(libs.plugins.tencent.vasdolly.get().pluginId)
}
dependencies {
}
按照你给的配置了 我啥还是报错:
A problem occurred configuring root project 'My Application'.