小编Mac*_*cik的帖子

GoogleCertificatesRslt:Kotlin Android 应用程序中不允许

我正在开发一个使用 Kotlin 作为开发语言的 Android 应用程序。该应用程序显示地图并应该加载标记。但是,地图会加载,但标记不会加载。我收到一个安全异常GoogleCertificatesRslt: not allowed,我发现它可能是由版本引起的。我正在使用的包是implementation 'com.google.android.gms:play-services-maps:18.0.2'. 有人知道问题是什么以及可能的解决方案吗?

摇篮文件:

plugins {
id 'com.android.application'
id 'org.jetbrains.kotlin.android'
id 'com.google.android.libraries.mapsplatform.secrets-gradle-plugin'
Run Code Online (Sandbox Code Playgroud)

}

android { 编译Sdk 32

defaultConfig {
    applicationId "com.ao.wildfire"
    minSdk 21
    targetSdk 32
    versionCode 1
    versionName "1.0"

    testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
    }
}
compileOptions {
    sourceCompatibility JavaVersion.VERSION_1_8
    targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
    jvmTarget = '1.8'
}
buildFeatures {
    viewBinding true
}
Run Code Online (Sandbox Code Playgroud)

}

依赖项{

implementation 'androidx.core:core-ktx:1.7.0'
implementation 'androidx.appcompat:appcompat:1.4.1'
implementation 'com.google.android.material:material:1.5.0'
implementation …
Run Code Online (Sandbox Code Playgroud)

android google-maps kotlin

11
推荐指数
1
解决办法
9247
查看次数

标签 统计

android ×1

google-maps ×1

kotlin ×1