android - Lcom/google/android/libraries/maps/R$string 类中没有类型 I 的静态字段 MAP_COPYRIGHTS_FULL;或其超类
问题描述
我在我的应用程序中使用谷歌地图,在我的手机(android 8)上它工作正常,但在我的旧平板电脑(5.02)上我收到了这个错误消息。我想这与依赖关系有关,但我无法弄清楚是什么。这是我的毕业典礼:
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
//maps
implementation name: 'maps-sdk-3.0.0-beta', ext: 'aar'
//needed for maps
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.google.android.gms:play-services-basement:17.0.0'
implementation 'com.google.android.gms:play-services-base:17.0.0'
implementation 'com.google.android.gms:play-services-gcm:17.0.0'
implementation 'com.google.android.gms:play-services-location:17.0.0'
//tablayout
implementation 'com.google.android.material:material:1.0.0'
implementation 'androidx.multidex:multidex:2.0.1'
//retrofit
implementation 'com.squareup.retrofit2:retrofit:2.5.0'
implementation 'com.squareup.retrofit2:converter-gson:2.4.0'
}
有任何想法吗?
解决方案
只需将这些添加到您的应用程序 strings.xml
<string name="MAP_COPYRIGHTS_GOOGLE_ONLY">© %1$d Google</string>
<string name="MAP_COPYRIGHTS_FULL">© %1$d Google – Pictures © %2$d %3$s, Map Data © %4$d %5$s</string>
<string name="MAP_COPYRIGHTS_IMAGERY_ONLY">© %1$d Google – Pictures © %2$d %3$s</string>
<string name="MAP_COPYRIGHTS_MAP_DATA_ONLY">© %1$d Google – Map Data © %2$d %3$s</string>
google tracker 有一个问题: google issue tracker
推荐阅读
- linux - Linux Huge pages 内存使用计算
- bash - bash - executing ssh command in a loop
- sql - 通过按最新记录排序来应用组
- c++ - 为什么升序排序 C++ 不能正常工作?
- python - Django - 媒体文件在生产中进行 404(Azure 存储)
- css - 为什么我的 CSS 变量在尝试在动画中使用时仍未使用?
- perl - 我如何获得会话
- wordpress - “隐藏在屏幕上”的 ACF 默认字段组设置
- android - NavGraph 退出动画未播放
- python - Flask 基于 localhost 或网络请求重定向客户端