Closed trungphan9x closed 5 years ago
Howdy! It's not clear exactly what the issue is since it seems like a problem with another plugin. However, I would just say to make sure you have migrated to AndroidX correctly
Howdy! It's not clear exactly what the issue is since it seems like a problem with another plugin. However, I would just say to make sure you have migrated to AndroidX correctly
I migrated to Androidx for long time ago. Now I just try to integrate Onesignal to the current project, but it was failed like that, I have no idea to solve this problem actually.
@trungphan9x There are a number of things that may be causing the issue. There is an out of order google()
reference causing the wrong repos to be checked first, apply
on onesignal-gradle-plugin
needs to be after defining it's version, and there is forced versioning happening with resolutionStrategy.eachDependency
that could be causing the 28.0.0 trying to be resolved for androidX which does not exist.
Can you try replacing your build.gradle
files with the ones noted here?
https://gist.github.com/jkasten2/5a8826f50e71e175e7ed7347befdbb58
Or see the specific changes here:
https://gist.github.com/jkasten2/5a8826f50e71e175e7ed7347befdbb58/revisions#diff-74eebd6227d31ffeaa1c683cc967ceb7
@trungphan9x There are a number of things that may be causing the issue. There is an out of order
google()
reference causing the wrong repos to be checked first,apply
ononesignal-gradle-plugin
needs to be after defining it's version, and there is forced versioning happening withresolutionStrategy.eachDependency
that could be causing the 28.0.0 trying to be resolved for androidX which does not exist.Can you try replacing your
build.gradle
files with the ones noted here? https://gist.github.com/jkasten2/5a8826f50e71e175e7ed7347befdbb58 Or see the specific changes here: https://gist.github.com/jkasten2/5a8826f50e71e175e7ed7347befdbb58/revisions#diff-74eebd6227d31ffeaa1c683cc967ceb7
Hi @jkasten2 , Thank for your suggestion, I changed to all the tips you suggested to me but it has still not worked for me. I still got the same issue after doing that.
Could you please post your updated gradle file?
@trungphan9x I believe the issue was related to a bug with the OneSignal-Gradle-Plugin which was just fixed yesterday. https://github.com/OneSignal/OneSignal-Gradle-Plugin/releases/tag/0.12.3
If you update to classpath 'gradle.plugin.com.onesignal:onesignal-gradle-plugin:0.12.3'
it should fix any AndroidX errors trying to get 26.0.0 or 28.0.0
@trungphan9x I believe the issue was related to a bug with the OneSignal-Gradle-Plugin which was just fixed yesterday. https://github.com/OneSignal/OneSignal-Gradle-Plugin/releases/tag/0.12.3
If you update to
classpath 'gradle.plugin.com.onesignal:onesignal-gradle-plugin:0.12.3'
it should fix any AndroidX errors trying to get 26.0.0 or 28.0.0
@jkasten2 It worked like a charm now. Thank you so much~~
@trungphan9x Good to hear, glad I could help!
Description: After updating the gradle file (app and project level) based on this instruction https://documentation.onesignal.com/docs/android-sdk-setup, I sync project with Gradle files , but got this issues:
After I click this:
, it showed another message like this
Environment
buildscript { repositories { maven { url 'https://plugins.gradle.org/m2/'} } dependencies { classpath 'gradle.plugin.com.onesignal:onesignal-gradle-plugin:0.12.2' } }
android { compileSdkVersion gradle.compileSdk defaultConfig { applicationId "live.vingo.androidkr" manifestPlaceholders = [ onesignal_app_id: '41adfc41-323d-4216-b92b-ca6e480aaee9', // Project number pulled from dashboard, local value is ignored. onesignal_google_project_number: 'REMOTE' ]
}
repositories { maven { url 'https://jitpack.io' } maven { url "https://adcolony.bintray.com/AdColony" } maven { url "https://dl.bintray.com/vdopiacorp/sdk" } maven { url "https://s3.amazonaws.com/moat-sdk-builds" } maven { url 'https://tapjoy.bintray.com/maven' }
}
dependencies {
}
configurations.all { resolutionStrategy.eachDependency { DependencyResolveDetails details -> def requested = details.requested if (requested.group == 'com.android.support') { if (!requested.name.startsWith("multidex")) { details.useVersion("$rootProject.ext.supportLibraryVersion") } } } }
apply plugin: 'com.google.gms.google-services'
apply plugin: 'kotlin-android-extensions'
Could someone please figure out why and how I can solve this problem?