gpt4 book ai didi

java - 错误 : In project 'app' a resolved Google Play services library dependency depends on another at an exact version while iintegrating onesignal

转载 作者:行者123 更新时间:2023-11-29 22:39:48 25 4
gpt4 key购买 nike

我试图在我的应用程序中实现 oneSignal,但出现错误

ERROR: In project 'app' a resolved Google Play services library dependency depends on another at an exact version (e.g. "[10.2. 1, 16.0.99]", but isn't being resolved to that version. Behavior exhibited by the library will be unknown.

Dependency failing: com.onesignal:OneSignal:3.12.3 -> com.google.android.gms:play-services-location@[10.2.1, 16.0.99], b ut play-services-location version was 15.0.1.

The following dependencies are project dependencies that are direct or have transitive dependencies that lead to the art ifact with the issue. -- Project 'app' depends onto com.google.android.gms:play-services-location@{strictly 15.0.1} -- Project 'app' depends onto com.onesignal:OneSignal@{strictly 3.12.3}

For extended debugging info execute Gradle from the command line with ./gradlew --info :app:assembleDebug to see the dep endency paths to the artifact. This error message came from the google-services Gradle plugin, report issues at https:// github.com/google/play-services-plugins and disable by adding "googleServices { disableVersionCheck = false }" to your b uild.gradle file.

这是我的gradle类


apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'

buildscript {
repositories {
maven { url 'https://plugins.gradle.org/m2/'}
}
dependencies {
classpath 'gradle.plugin.com.onesignal:onesignal-gradle-plugin:[0.12.4, 0.99.99]'
}
}
apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin'

repositories {
maven { url 'https://maven.google.com' }
}


android {
compileSdkVersion 29
buildToolsVersion "29.0.2"
defaultConfig {
applicationId "com.example.gerobokgo"
minSdkVersion 26
targetSdkVersion 29
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.Test.runner.AndroidJUnitRunner"
manifestPlaceholders = [
onesignal_app_id: '560003c8-bceb-4896-bf78-435948f4fc6d',
// Project number pulled from dashboard, local value is ignored.
onesignal_google_project_number: 'REMOTE'
]
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.google.firebase:firebase-auth:16.0.5'
implementation 'com.google.firebase:firebase-database:16.0.4'
implementation 'com.google.firebase:firebase-core:16.0.8'
implementation 'com.firebaseui:firebase-ui-database:4.3.2'
implementation 'com.google.firebase:firebase-storage:16.0.4'

testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'

implementation 'com.squareup.picasso:picasso:2.5.2'
//Layout
implementation 'com.google.android.material:material:1.0.0'
//recylervieer
implementation 'androidx.recyclerview:recyclerview:1.0.0'

// image slider
implementation 'com.github.therealshabi:AutoImageFlipper:v1.4.1'

//image Cropper
implementation 'com.theartofdev.edmodo:android-image-cropper:2.1.+'
implementation 'androidx.work:work-runtime:2.2.0'

implementation 'com.braintreepayments:card-form:3.1.1'


//onesignal
implementation 'com.onesignal:OneSignal:[3.11.2, 3.99.99]'
}


最佳答案

我在这里的 Kotlin 项目中遇到了同样的问题,解决方案是将 implementation 'androidx.fragment:fragment-ktx:1.2.2' 依赖项添加到我的模块的 build.gradle 文件中。

关于java - 错误 : In project 'app' a resolved Google Play services library dependency depends on another at an exact version while iintegrating onesignal,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59128152/

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