Atikur Rahman Sabuj
Atikur Rahman Sabuj

Reputation: 436

Failed to resolve: com.onesignal:onesignal:3.12.3 on Native Android

I'm trying to setup one signal sdk to my native android application but failing with error:

"ERROR: Failed to resolve: com.onesignal:onesignal:3.12.3"

Tried some solutions from other related questions (most of the solutions are for old versions) and one signal website's troubleshoot section, nothing worked. My gradle file

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'
apply plugin: 'com.android.application'
repositories {
maven { url 'https://maven.google.com' }
}
android {
compileSdkVersion 28
defaultConfig {
    applicationId "com.tiringbring.roomdbtest"
    minSdkVersion 19
    targetSdkVersion 28
    versionCode 1
    versionName "1.0"
    testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    manifestPlaceholders = [
            onesignal_app_id: 'tttttttt-25e9-tttt-tttt-77dc29ce5a08',
            // 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.0.2'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
implementation "androidx.room:room-runtime:2.2.0-beta01"
annotationProcessor "androidx.room:room-compiler:2.2.0-beta01"
implementation 'com.android.support:recyclerview-v7:28.0.0'
implementation 'com.android.support:cardview-v7:28.0.0'
implementation 'com.onesignal:onesignal:3.12.3'
}

Upvotes: 0

Views: 4557

Answers (2)

Atikur Rahman Sabuj
Atikur Rahman Sabuj

Reputation: 436

Seems like there was an spelling error in the documentation of One Signal as Anzy ShQ commented. Using 'com.onesignal:OneSignal:3.12.3' worked.

Upvotes: 0

GbAndroid
GbAndroid

Reputation: 21

Changing from 0.12.4 to 0.13.4 worked for me:

classpath 'gradle.plugin.com.onesignal:onesignal-gradle-plugin:[0.13.4, 0.99.99]'

Upvotes: 2

Related Questions