我正在构建一个反应原生应用程序,在其中我使用react-native-baidumap-sdk。当我尝试运行应用程序时,我遇到了错误。
任务 ':react-native-baidumap-sdk:compileDebugKotlin' 执行失败。
下面是我的 build.gradle 文件
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext {
buildToolsVersion = "28.0.3"
minSdkVersion = 16
compileSdkVersion = 28
targetSdkVersion = 28
supportLibVersion = "28.0.0"
googlePlayServicesVersion = "16.0.0" // or set latest version
androidMapsUtilsVersion = "0.5+"
ext.kotlin_version = '1.3.21'
}
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.1'
// classpath 'org.jetbrains.kotlin:kotlin-gradle-plugin:1.2.41'
// classpath 'com.android.tools.build:gradle:3.4.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
// Add jitpack repository (added by react-native-spinkit)
maven { url "https://jitpack.io" }
mavenLocal()
google()
jcenter()
// maven { url "https://maven.google.com" }
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url "$rootDir/../node_modules/react-native/android"
}
}
}
subprojects {
afterEvaluate {project ->
if (project.hasProperty("android")) {
android {
compileSdkVersion 28
buildToolsVersion "28.0.3"
}
}
}
}