我收到以下错误
无法获得类型为org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHand的对象的未知属性'supportLibVersion'
我正在开发本机应用程序,并且本机映射依赖项在下面出现错误
dependencies {
def supportLibMajorVersion = supportLibVersion.split('\\.')[0] as int
def appCompatLibName = (supportLibMajorVersion < 20) ? "androidx.appcompat:appcompat" : "com.android.support:appcompat-v7"
implementation "$appCompatLibName:$supportLibVersion"
implementation('com.facebook.react:react-native:+') {
exclude group: 'com.android.support'
}
implementation "com.google.android.gms:play-services-base:${safeExtGet('playServicesVersion', '16.1.0')}"
implementation "com.google.android.gms:play-services-maps:${safeExtGet('playServicesVersion', '16.1.0')}"
implementation 'com.google.maps.android:android-maps-utils:0.5'
}
有人知道这是怎么回事吗?
终端中的错误是
失败:构建失败,发生异常。
其中:
构建文件'D:\ react native \ abhishek \ Gwala \ node_modules \ react-native-maps \ lib \ android \ build.gradle'行:20出了什么问题:
评估项目':react-native-maps'时发生问题。
无法获得类型为org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler的对象的未知属性'supportLibVersion'。
第20行是
def supportLibMajorVersion = supportLibVersion.split('\\.')[0] as int