Failed to resolve: com.onesignal:onesignal:3.12.3 on Native Android - 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'
}

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]'

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.

Related

Im facing this error Failed to resolve: com.github.parse-community.Parse-SDK-Android:parse:4.0.0

Im trying to implement Parse in my android studio project.
I have followed this guide https://www.back4app.com/docs/android/parse-android-sdk
until step 4 :
implementation "com.github.parse-community.Parse-SDK-Android:parse:4.0.0"
Since this, i have this error message when i try to sync
Failed to resolve: com.github.parse-community.Parse-SDK-Android:parse:4.0.0"
enter image description here
I've just tested it here, and I was able to make it work.
See my entire file, maybe you can use it as a reference. I got it from here: https://github.com/templates-back4app/push-android-latest-version/blob/master/app/build.gradle
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 32
defaultConfig {
applicationId "com.android.application"
minSdkVersion 24
targetSdkVersion 32
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
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.6.0-alpha05'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test:runner:1.5.0-alpha04'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.0-alpha07'
implementation "com.github.parse-community.Parse-SDK-Android:parse:4.0.0"
implementation "com.github.parse-community.Parse-SDK-Android:fcm:4.0.0"
implementation "com.google.firebase:firebase-core:21.1.0"
implementation "com.google.firebase:firebase-messaging:23.0.7"
}
repositories {
mavenCentral()
jcenter()
maven { url 'https://jitpack.io' }
}

how to fix ERROR: Could not determine artifacts for com.github.apl-devs:appintro:v4.2.3: Skipped due to earlier error

Just building my new app and after launching I get this error in my build.gradle file can anyone help?
Could not determine artifacts for `com.github.apl-devs:appintro:v4.2.3: Skipped due to earlier error`
I have made sure the app in settings is offline.
I also added jitpack.io into buildScript and "allprojects"
url "https://jitpack.io"
Try this build.gradle, it works for me:
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.example.test2"
minSdkVersion 19
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.0.0-beta01'
implementation 'androidx.lifecycle:lifecycle-extensions:2.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.github.apl-devs:appintro:v4.2.3'
}
and add this part to app gradle:
allprojects {
repositories {
google()
jcenter()
maven { url "https://jitpack.io" }
}
}

implementation 'com.android.support:appcompat-v7:28.0.0' - Failed to resolve: firebase-core/auth-15.0.0

In android studio, after adding Firebase authentication I got this error, Failed to resolve: firebase-core-15.0.0, Failed to resolve: firebase-auth-15.0.0 I changed v7:28.0.0 into v7:28.+ but same error appears. I added Maven
allprojects {
repositories {
maven {
url 'https://maven.google.com/'
name 'Google'
}
google()
jcenter()
}
but same error got.
Full build.gradle code:
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.example.thisuri.blogzone"
minSdkVersion 15
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
externalNativeBuild {
cmake {
cppFlags ""
}
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
externalNativeBuild {
cmake {
path "CMakeLists.txt"
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.android.support:design:28.0.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.google.firebase:firebase-core:16.0.1:15.0.0'
implementation 'com.google.firebase:firebase-auth:16.0.1:15.0.0'
}
What is the solution?
Change this:
implementation 'com.google.firebase:firebase-core:16.0.1:15.0.0'
implementation 'com.google.firebase:firebase-auth:16.0.1:15.0.0'
Into this:
implementation 'com.google.firebase:firebase-core:16.0.6'
implementation 'com.google.firebase:firebase-auth:16.1.0'
When declaring a dependency you need to write the groupId, artifactId and version number.
Also check this:
https://firebase.google.com/support/release-notes/android

OSM Android dependecies failed to resolve

I'm currently trying to implement OSMDroid in to my project, but doing it has shown in the OSMDroid tutorial (http://osmdroid.github.io/osmdroid/index.html) does not seem to be working.
When I try to sync the Gradle project I get the following message:
Failed to resolve: osmdroid-android
And I have here the full build.gradle(Module: app):
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.example.massas.emergency_numbers_pi"
minSdkVersion 23
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation 'org.osmdroid:osmdroid-android:6.0.0-SNAPSHOT'
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}
Am I doing something wrong or is the dependencie just outdated? Should I insert the dependencies in the project build.gradle?
I'm new to android dev, so please bear with me! Thanks
1) Make sure you have added the repository. You need maven central for stable releases and sonatype for snapshot. Instructions for that are included in the documentation but for the sake of this response:
Current stable:
repositories {
mavenCentral()
}
dependencies {
implementation 'org.osmdroid:osmdroid-android:6.0.1'
}
Current snapshot:
repositories {
mavenCentral()
maven{
url 'https://oss.sonatype.org/content/repositories/snapshots/'
name 'OSS-Sonatype'
}
}
dependencies {
implementation 'org.osmdroid:osmdroid-android:6.0.2-SNAPSHOT'
}
Note: you can also add repositories to your root gradle file to the allprojects section.
2) You should use the stable version (6.0.1 at the time of writing) uless you have a specific reason to use snapshot.

Error:Could not resolve com.android.support:appcompat-v7:26.0.0-beta1

I have install android studio on macbook pro and I am sure I have install all the required SDK for it to work but yet still I am having issues with errors. below is the error messages
Unable to resolve dependency for ':app#debug/compileClasspath': Could not resolve com.android.support:appcompat-v7:26.0.0-beta1.
Could not resolve com.android.support:appcompat-v7:26.0.0-beta1.
Required by: project :app
No cached version of com.android.support:appcompat-v7:26.0.0-beta1 available for offline mode.
here is my gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
defaultConfig {
applicationId "com.example.air.my1st"
minSdkVersion 15
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.0.0-beta1'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
implementation 'com.android.support:design:26.0.0-beta1'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:0.5'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:2.2.2'
}
Thanks all in advance.
add this code in build.gradle:
allprojects {
repositories {
jcenter()
maven {
url "https://maven.google.com"
}
}
}
Try to change the targetSdkVersion 27
Dependencies to latest:
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:design:27.1.1'

Categories

Resources