您好,我在同步项目时遇到此错误e:D:\Projects\Android Projects\Learning\Android\Task\settings.gradle.kts:13:21:意外的标记(使用';'来分隔同一行上的表达式)
这是我的设置.gradle
pluginManagement {
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
maven { url "https://jitpack.io" }
}
}
rootProject.name = "Gweiland_Task"
include(":app")
字符串
这是我的模块和项目级构建文件
项目
// Top-level build file where you can add configuration options common to all sub-projects/modules.
plugins {
id("com.android.application") version "8.1.2" apply false
}
型
模块
plugins {
id("com.android.application")
}
android {
namespace = "com.example.gweiland_task"
compileSdk = 34
defaultConfig {
applicationId = "com.example.gweiland_task"
minSdk = 25
targetSdk = 34
versionCode = 1
versionName = "1.0"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
isMinifyEnabled = false
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
viewBinding {
enable = true
}
}
dependencies {
implementation("androidx.appcompat:appcompat:1.6.1")
implementation("com.google.android.material:material:1.10.0")
implementation("androidx.constraintlayout:constraintlayout:2.1.4")
testImplementation("junit:junit:4.13.2")
androidTestImplementation("androidx.test.ext:junit:1.1.5")
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
// mp chart
implementation("com.github.PhilJay:MPAndroidChart:v3.1.0")
implementation("com.github.jitpack:android-example:1.0.1")
}
型
我正在尝试为我的一个库导入jitpack.io
1条答案
按热度按时间nr9pn0ug1#
您正在尝试在Kotlin构建脚本中使用Groovy代码。
字符串