gpt4 book ai didi

java - 安装 Google Maps SDK Beta 3.1.0 时出错 Could not filnd :places-map-sdk-3. 1.0-beta:

转载 作者:行者123 更新时间:2023-12-05 00:03:56 24 4
gpt4 key购买 nike

我正在尝试安装 Google Maps SDK 并决定使用当前的测试版。我已按照所有安装说明进行操作,但在重建项目时出现以下错误。

任务“:app:checkDebugAarMetadata”执行失败。

Could not resolve all files for configuration ':app:debugRuntimeClasspath'.Could not find :places-maps-sdk-3.1.0-beta:.Required by:project :app

安装下载的文件places-maps-sdk-3.1.0-beta.aar已经放在项目的app\libs文件夹下。

[![enter image description here][1]][1]

附上我的项目级gradle构建

apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 29
buildToolsVersion "29.0.2"
defaultConfig {
applicationId "com.grgapps.checkingin"
minSdkVersion 26
targetSdkVersion 29
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
customDebugType {
debuggable true
}
}
compileOptions {
sourceCompatibility = 1.8
targetCompatibility = 1.8
}
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar','*.aar'])
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'com.google.android.material:material:1.2.1'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.navigation:navigation-fragment:2.3.1'
implementation 'androidx.navigation:navigation-ui:2.3.1'
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'androidx.recyclerview:recyclerview:1.1.0'
implementation 'com.google.android.gms:play-services-ads:19.5.0'
implementation 'com.google.firebase:firebase-ads:19.5.0'
implementation 'androidx.work:work-runtime:2.5.0-beta01'
implementation 'androidx.preference:preference:1.1.1'
//implementation 'com.google.android.gms:play-services-maps:17.0.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
implementation "androidx.viewpager2:viewpager2:1.0.0"
implementation 'com.google.firebase:firebase-analytics:18.0.0'
implementation "com.google.firebase:firebase-messaging:21.0.0"

implementation 'com.google.android.libraries.maps:maps:3.1.0-beta'

// If you are using Places, add all of the dependencies below
implementation name:'places-maps-sdk-3.1.0-beta', ext:'aar'
implementation 'com.google.android.gms:play-services-gcm:17.0.0'
implementation 'com.google.auto.value:auto-value-annotations:1.6.5'
implementation 'com.google.maps.android:android-maps-utils-v3:2.2.0'


implementation 'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1'

implementation('com.mikepenz:materialdrawer:5.9.5@aar') {
transitive = true
exclude group: 'com.android.support'
}
// Room components
implementation "androidx.room:room-runtime:2.2.5"
annotationProcessor "androidx.room:room-compiler:2.2.5"
androidTestImplementation "androidx.room:room-testing:2.2.5"

// Lifecycle components
implementation "androidx.lifecycle:lifecycle-extensions:$rootProject.archLifecycleVersion"
annotationProcessor "androidx.lifecycle:lifecycle-compiler:$rootProject.archLifecycleVersion"

// UI
implementation "com.google.android.material:material:1.2.1"

// Testing
androidTestImplementation "androidx.arch.core:core-testing:$rootProject.coreTestingVersion"
}



以下是我的顶层构建gradle文件

// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
repositories {
google()
jcenter()
flatDir {
dirs 'libs'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:4.1.1'
classpath 'com.google.gms:google-services:4.3.3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

allprojects {
repositories {
google()
jcenter()

}
}

task clean(type: Delete) {
delete rootProject.buildDir
}
ext {
roomVersion = '2.2.5'
archLifecycleVersion = '2.2.0-rc03'
coreTestingVersion = '2.1.0'
materialVersion = '1.2.1'
}

最佳答案

我发现他们没有使用他们在 build.gradle 文件的文档中的行:

implementation name:'places-maps-sdk-3.1.0-beta', ext:'aar'

如果我使用这条线,它会很好地同步:

implementation group: 'com.google.android.libraries.maps', name: 'maps', version: '3.1.0-beta'

我远不是 Gradle 专家,所以我不太确定这里有什么区别 - 但在更改导入和所有内容之后,我的应用程序构建并且似乎运行良好。

关于java - 安装 Google Maps SDK Beta 3.1.0 时出错 Could not filnd :places-map-sdk-3. 1.0-beta:,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65072844/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com